summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobwidget.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobwidget.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index b93e9d4bc1..9d144c906b 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -196,6 +196,26 @@ def soften_color(widget, state=gtk.STATE_NORMAL):
196 color.blue = color.blue * blend + style.base[state].blue * (1.0 - blend) 196 color.blue = color.blue * blend + style.base[state].blue * (1.0 - blend)
197 return color.to_string() 197 return color.to_string()
198 198
199class HobButton(gtk.Button):
200 """
201 A gtk.Button subclass which follows the visual design of Hob for primary
202 action buttons
203
204 label: the text to display as the button's label
205 """
206 def __init__(self, label):
207 gtk.Button.__init__(self, "<span size='x-large'><b>%s</b></span>" % gobject.markup_escape_text(label))
208 self.child.set_use_markup(True)
209
210 style = self.get_style()
211 button_color = gtk.gdk.Color(HobColors.ORANGE)
212 self.modify_bg(gtk.STATE_NORMAL, button_color)
213 self.modify_bg(gtk.STATE_PRELIGHT, button_color)
214 self.modify_bg(gtk.STATE_SELECTED, button_color)
215
216 self.set_flags(gtk.CAN_DEFAULT)
217 self.grab_default()
218
199class HobAltButton(gtk.Button): 219class HobAltButton(gtk.Button):
200 """ 220 """
201 A gtk.Button subclass which has no relief, and so is more discrete 221 A gtk.Button subclass which has no relief, and so is more discrete