summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobwidget.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2012-03-21 18:42:35 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-22 14:40:41 +0000
commit21970f475590e9ce81412c02c467c74e5d109ddc (patch)
treedc15a5b356f46a1cb1cb2f783958c6ae907ae1c1 /bitbake/lib/bb/ui/crumbs/hobwidget.py
parent457ec75e390e7ee1193a9b62a463b28db5730845 (diff)
downloadpoky-21970f475590e9ce81412c02c467c74e5d109ddc.tar.gz
lib/bb/ui/crumbs: Add HobAltButton and use it
This adds a gtk.Button subclass for secondary actions which unsets the relief so that the user is aware that the button is clickable and yet it is more subtle than the primary action (such that the primary action is the most obvious one) - this is per the interaction design. Further we replace all uses of gtk.LinkButton with the new HobAltButton Partially addresses [YOCTO #2105], a follow on patch will theme the button so that it matches the visual design. (From Poky rev: c3f17fed243180678264168968333463b203bfa0) (Bitbake rev: 601521c2d7f5568d94529a77b2cbe19fef7cbf48) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobwidget.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index db52c47415..189ffb40d3 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -171,11 +171,18 @@ class HobViewTable (gtk.VBox):
171 if not view_column.get_title() in self.toggle_columns: 171 if not view_column.get_title() in self.toggle_columns:
172 self.emit("row-activated", tree.get_model(), path) 172 self.emit("row-activated", tree.get_model(), path)
173 173
174class HobAltButton(gtk.Button):
175 """
176 A gtk.Button subclass which has no relief, and so is more discrete
177 """
178 def __init__(self, label=None):
179 gtk.Button.__init__(self, label)
180 self.set_relief(gtk.RELIEF_NONE)
181
174class HobXpmLabelButtonBox(gtk.EventBox): 182class HobXpmLabelButtonBox(gtk.EventBox):
175 """ label: name of buttonbox 183 """ label: name of buttonbox
176 description: the simple description 184 description: the simple description
177 """ 185 """
178
179 def __init__(self, display_file="", hover_file="", label="", description=""): 186 def __init__(self, display_file="", hover_file="", label="", description=""):
180 gtk.EventBox.__init__(self) 187 gtk.EventBox.__init__(self)
181 self._base_state_flags = gtk.STATE_NORMAL 188 self._base_state_flags = gtk.STATE_NORMAL