From 7f6d81eac03a6403de481d2d3c95c56e37ecf653 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 27 May 2019 21:57:00 +0200 Subject: icons: add widgets icons --- icons/mkicons | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'icons/mkicons') diff --git a/icons/mkicons b/icons/mkicons index 8ecc8e2..6a2ee15 100755 --- a/icons/mkicons +++ b/icons/mkicons @@ -257,6 +257,23 @@ def icon_awesome (icon, draw, p): draw.line ((x0, y1, x2, y1), fill = p.fg) draw.line ((x1, y2, x2, y2, x2, y3), fill = p.fg) +def icon_widget_separator (icon, draw, p): + x1, y1, _, y2 = p.coords + draw.line ((x1, y1, x1, y2), fill = p.fg) +icon_widget_separator.ratio = (1, 4) + +def icon_widget_bat (icon, draw, p): + x1, y1, x2, y2 = p.coords + s = part (0, y2 - y1, 1, 10, 'up') + bx1 = part (x1, x2, 1, 4, 'center') + bx2 = part (x1, x2, 3, 4, 'center') + draw.rectangle ((bx1 + 2, y1 + 1, bx2 - 2, y1 + 1 + s), + outline = p.fg, fill = p.bg) + draw.rectangle ((bx1, y1 + 1 + s, bx2, y2 - 1), + outline = p.fg, fill = p.bg) + draw.rectangle ((bx1 + 2, y1 + 1 + s + 2, bx2 - 2, y2 - 1 - 2), + outline = p.fg, fill = p.fg) + icons = dict((f[5:].replace ('_', '/'), globals ()[f]) for f in dir () if f.startswith ('icon_')) for name, func in icons.iteritems (): -- cgit v1.2.3