Patchwork [bitbake-devel,02/10] ui/crumbs/persistenttooltip: tweak borders

login
register
mail settings
Submitter Joshua Lock
Date March 22, 2012, 2:10 a.m.
Message ID <eb2ce0fd0b98f25a5bebf933404b0d0b713a160b.1332381654.git.josh@linux.intel.com>
Download mbox | patch
Permalink /patch/24081/
State New
Headers show

Comments

Joshua Lock - March 22, 2012, 2:10 a.m.
Change the layout and borders so that the close button is flush with the
edge of the tooltip window yet leave the contents with a small border such
that text isn't flush with the window edge.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/persistenttooltip.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

Patch

diff --git a/lib/bb/ui/crumbs/persistenttooltip.py b/lib/bb/ui/crumbs/persistenttooltip.py
index bae697e..e9cc380 100644
--- a/lib/bb/ui/crumbs/persistenttooltip.py
+++ b/lib/bb/ui/crumbs/persistenttooltip.py
@@ -64,7 +64,7 @@  class PersistentTooltip(gtk.Window):
 		# We must be modal to ensure we grab focus when presented from a gtk.Dialog
 		self.set_modal(True)
 
-		self.set_border_width(6)
+		self.set_border_width(0)
 		self.set_position(gtk.WIN_POS_MOUSE)
 		self.set_opacity(0.95)
 
@@ -91,10 +91,14 @@  class PersistentTooltip(gtk.Window):
 
 		self.set_default(self.button)
 
+		hbox = gtk.HBox(True, 6)
+		hbox.set_border_width(6)
+		hbox.show()
+		vbox.pack_end(hbox, True, True, 6)
 		self.label = gtk.Label()
 		self.label.set_markup(markup)
 		self.label.show()
-		vbox.pack_end(self.label, True, True, 6)
+		hbox.pack_end(self.label, True, True, 6)
 
 		self.connect("key-press-event", self._catch_esc_cb)