Draw icons first, then labels etc.
Draw icons first, then labels etc.
diff --git a/qwerty.py b/qwerty.py
index 8bec4aa..c3f7ac8 100755
--- a/qwerty.py
+++ b/qwerty.py
@@ -29,7 +29,7 @@ CANCEL = False
PADDING = 4
ICON_TOP_MARGIN = 35
LABEL_LEFT, LABEL_TOP = 15,25
-LABEL_FONT_SIZE_COEF = 0.016
+LABEL_FONT_SIZE_COEF = 0.019
DESC_TOP = 110
DESC_FONT_SIZE_COEF = 0.014
KEY_BOTTOM = 35
@@ -180,6 +180,9 @@ class SuperButton(gtk.DrawingArea):
if self.active:
cr.set_source_rgb(*BUTTON_BORDER_ACTIVE)
+ if self.icon:
+ self.draw_icon(cr)
+
# Draw key
cr.move_to(LABEL_LEFT, self.height-KEY_BOTTOM)
cr.set_font_size(KEY_FONT_SIZE)
@@ -189,9 +192,6 @@ class SuperButton(gtk.DrawingArea):
if self.desc and self.active:
self.draw_desc(cr)
- if self.icon:
- self.draw_icon(cr)
-
def on_mouse_over(self,widget,event):
if self.active:
self.fg = BUTTON_BORDER_ACTIVE