diff options
author | Joshua Lock <josh@linux.intel.com> | 2012-03-23 17:23:04 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-25 12:23:34 +0100 |
commit | 188cf893ddf0b3bbf7a63409505a85930ce777dc (patch) | |
tree | 5efbd9c0647866dc06ffd2d598b451b201e7576b /bitbake/lib/bb | |
parent | 61f039d57cbd26f1119cce281f32a72a5e149816 (diff) | |
download | poky-188cf893ddf0b3bbf7a63409505a85930ce777dc.tar.gz |
lib/bb/ui/crumbs/persistenttooltip: layout tweaks
The design documents have the close button vertically aligned with the
tooltip contents - reorganise the interal widget layout to achieve this.
(Bitbake rev: 4f8c36226867291c7b6c413ee2570d61a326ec47)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/persistenttooltip.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/persistenttooltip.py b/bitbake/lib/bb/ui/crumbs/persistenttooltip.py index 8ba0043381..e18406221e 100644 --- a/bitbake/lib/bb/ui/crumbs/persistenttooltip.py +++ b/bitbake/lib/bb/ui/crumbs/persistenttooltip.py | |||
@@ -76,9 +76,7 @@ class PersistentTooltip(gtk.Window): | |||
76 | # Draw our label and close buttons | 76 | # Draw our label and close buttons |
77 | hbox = gtk.HBox(False, 0) | 77 | hbox = gtk.HBox(False, 0) |
78 | hbox.show() | 78 | hbox.show() |
79 | vbox = gtk.VBox(False, 0) | 79 | self.add(hbox) |
80 | vbox.show() | ||
81 | vbox.pack_start(hbox, True, True, 0) | ||
82 | 80 | ||
83 | img = gtk.Image() | 81 | img = gtk.Image() |
84 | img.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_BUTTON) | 82 | img.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_BUTTON) |
@@ -89,18 +87,21 @@ class PersistentTooltip(gtk.Window): | |||
89 | self.button.set_can_default(True) | 87 | self.button.set_can_default(True) |
90 | self.button.grab_focus() | 88 | self.button.grab_focus() |
91 | self.button.show() | 89 | self.button.show() |
90 | vbox = gtk.VBox(False, 0) | ||
91 | vbox.show() | ||
92 | vbox.pack_start(self.button, False, False, 0) | ||
92 | if __button_right: | 93 | if __button_right: |
93 | hbox.pack_end(self.button, False, False, 0) | 94 | hbox.pack_end(vbox, True, True, 0) |
94 | else: | 95 | else: |
95 | hbox.pack_start(self.button, False, False, 0) | 96 | hbox.pack_start(vbox, True, True, 0) |
96 | 97 | ||
97 | self.set_default(self.button) | 98 | self.set_default(self.button) |
98 | 99 | ||
99 | hbox = gtk.HBox(True, 6) | 100 | bin = gtk.HBox(True, 6) |
100 | hbox.set_border_width(6) | 101 | bin.set_border_width(6) |
101 | hbox.show() | 102 | bin.show() |
102 | vbox.pack_end(hbox, True, True, 6) | ||
103 | self.label = gtk.Label() | 103 | self.label = gtk.Label() |
104 | self.label.set_line_wrap(True) | ||
104 | # We want to match the colours of the normal tooltips, as dictated by | 105 | # We want to match the colours of the normal tooltips, as dictated by |
105 | # the users gtk+-2.0 theme, wherever possible - on some systems this | 106 | # the users gtk+-2.0 theme, wherever possible - on some systems this |
106 | # requires explicitly setting a fg_color for the label which matches the | 107 | # requires explicitly setting a fg_color for the label which matches the |
@@ -119,12 +120,11 @@ class PersistentTooltip(gtk.Window): | |||
119 | break # we only care for the tooltip_fg_color | 120 | break # we only care for the tooltip_fg_color |
120 | self.label.set_markup(markup) | 121 | self.label.set_markup(markup) |
121 | self.label.show() | 122 | self.label.show() |
122 | hbox.pack_end(self.label, True, True, 6) | 123 | bin.add(self.label) |
124 | hbox.pack_end(bin, True, True, 6) | ||
123 | 125 | ||
124 | self.connect("key-press-event", self._catch_esc_cb) | 126 | self.connect("key-press-event", self._catch_esc_cb) |
125 | 127 | ||
126 | self.add(vbox) | ||
127 | |||
128 | """ | 128 | """ |
129 | Callback when the PersistentTooltip's close button is clicked. | 129 | Callback when the PersistentTooltip's close button is clicked. |
130 | Hides the PersistentTooltip. | 130 | Hides the PersistentTooltip. |