Received: from mga02.intel.com ([134.134.136.20]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1UcYdc-0001W7-Ie for bitbake-devel@lists.openembedded.org; Wed, 15 May 2013 12:08:55 +0200 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 15 May 2013 02:50:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,675,1363158000"; d="scan'208";a="313906506" Received: from adinu-vostro-460.rb.intel.com ([10.237.105.143]) by orsmga001.jf.intel.com with ESMTP; 15 May 2013 02:50:33 -0700 From: Andrei Dinu To: bitbake-devel@lists.openembedded.org Date: Wed, 15 May 2013 12:51:08 +0300 Message-Id: <1368611468-14420-1-git-send-email-andrei.adrianx.dinu@intel.com> X-Mailer: git-send-email 1.7.9.5 Subject: [PATCH] propertydialog.py : Scrollable windows for long tooltips X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 May 2013 10:09:13 -0000 In some cases, the length of the description and the brought in by field was too big. That led to the size of the property dialog exceeding Hob's size. For long tooltips we use scrollable windows now. [HOB #4321] Signed-off-by: Andrei Dinu --- bitbake/lib/bb/ui/crumbs/hig/propertydialog.py | 34 +++++++++--------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/bitbake/lib/bb/ui/crumbs/hig/propertydialog.py b/bitbake/lib/bb/ui/crumbs/hig/propertydialog.py index 89cb3a3..5a41ae7 100644 --- a/bitbake/lib/bb/ui/crumbs/hig/propertydialog.py +++ b/bitbake/lib/bb/ui/crumbs/hig/propertydialog.py @@ -274,24 +274,23 @@ class PropertyDialog(CrumbsDialog): binb_items_count = len(binb.split(',')) binb_items = binb.split(',') - vbox = gtk.VBox(True,spacing = 0) - + vbox = gtk.VBox(False,spacing = 0) + ######################################## SUMMARY LABEL ######################################### if summary != '': self.label_short = gtk.Label() - self.label_short.set_size_request(300,-1) + self.label_short.set_width_chars(37) self.label_short.set_selectable(True) self.label_short.set_line_wrap(True) self.label_short.set_markup("" + summary + "") self.label_short.set_property("xalign", 0) - self.vbox.pack_start(self.label_short, expand=False, fill=False, padding=0) + self.vbox.add(self.label_short) ########################################## NAME ROW + COL ####################################### self.label_short = gtk.Label() - self.label_short.set_size_request(300,-1) self.label_short.set_selectable(True) self.label_short.set_line_wrap(True) self.label_short.set_markup("Name: " + name) @@ -302,7 +301,6 @@ class PropertyDialog(CrumbsDialog): ####################################### VERSION ROW + COL #################################### self.label_short = gtk.Label() - self.label_short.set_size_request(300,-1) self.label_short.set_selectable(True) self.label_short.set_line_wrap(True) self.label_short.set_markup("Version: " + version) @@ -313,7 +311,6 @@ class PropertyDialog(CrumbsDialog): ##################################### REVISION ROW + COL ##################################### self.label_short = gtk.Label() - self.label_short.set_size_request(300,-1) self.label_short.set_line_wrap(True) self.label_short.set_selectable(True) self.label_short.set_markup("Revision: " + revision) @@ -324,7 +321,6 @@ class PropertyDialog(CrumbsDialog): ################################## GROUP ROW + COL ############################################ self.label_short = gtk.Label() - self.label_short.set_size_request(300,-1) self.label_short.set_selectable(True) self.label_short.set_line_wrap(True) self.label_short.set_markup("Group: " + group) @@ -346,7 +342,6 @@ class PropertyDialog(CrumbsDialog): self.label_info.set_property("xalign", 0) self.label_short = gtk.Label() - self.label_short.set_size_request(300,-1) self.label_short.set_selectable(True) self.label_short.set_line_wrap(True) self.label_short.set_markup("Homepage: ") @@ -368,7 +363,6 @@ class PropertyDialog(CrumbsDialog): self.label_info.set_property("xalign", 0) self.label_short = gtk.Label() - self.label_short.set_size_request(300,-1) self.label_short.set_selectable(True) self.label_short.set_line_wrap(True) self.label_short.set_markup("Bugtracker: ") @@ -380,7 +374,6 @@ class PropertyDialog(CrumbsDialog): ################################# LICENSE ROW + COL ############################################ self.label_info = gtk.Label() - self.label_info.set_size_request(300,-1) self.label_info.set_selectable(True) self.label_info.set_line_wrap(True) self.label_info.set_markup(license) @@ -403,26 +396,24 @@ class PropertyDialog(CrumbsDialog): self.label_short.set_line_wrap(True) self.label_short.set_markup("Brought in by: ") self.label_short.set_property("xalign", 0) - self.vbox.add(self.label_short) - self.label_info = gtk.Label() - self.label_info.set_size_request(300,-1) self.label_info.set_selectable(True) + self.label_info.set_width_chars(36) if len(binb) > 200: scrolled_window = gtk.ScrolledWindow() scrolled_window.set_policy(gtk.POLICY_NEVER,gtk.POLICY_ALWAYS) scrolled_window.set_size_request(100,100) self.label_info.set_markup(binb) - self.label_info.set_property("xalign", 0) + self.label_info.set_padding(6,6) + self.label_info.set_alignment(0,0) self.label_info.set_line_wrap(True) scrolled_window.add_with_viewport(self.label_info) self.vbox.add(scrolled_window) else: self.label_info.set_markup(binb) self.label_info.set_property("xalign", 0) - self.label_info.set_line_wrap(True) - + self.label_info.set_line_wrap(True) self.vbox.add(self.label_info) ################################ DESCRIPTION TAG ROW ################################################# @@ -438,21 +429,22 @@ class PropertyDialog(CrumbsDialog): hbox = gtk.HBox(True,spacing = 0) self.label_short = gtk.Label() - self.label_short.set_size_request(300,-1) self.label_short.set_selectable(True) + self.label_short.set_width_chars(36) if len(description) > 200: scrolled_window = gtk.ScrolledWindow() scrolled_window.set_policy(gtk.POLICY_NEVER,gtk.POLICY_ALWAYS) scrolled_window.set_size_request(100,100) self.label_short.set_markup(description) - self.label_short.set_property("xalign", 0) + self.label_short.set_padding(6,6) + self.label_short.set_alignment(0,0) self.label_short.set_line_wrap(True) scrolled_window.add_with_viewport(self.label_short) self.vbox.add(scrolled_window) else: - self.label_short.set_text(description) - self.label_short.set_line_wrap(True) + self.label_short.set_markup(description) self.label_short.set_property("xalign", 0) + self.label_short.set_line_wrap(True) self.vbox.add(self.label_short) self.vbox.show_all() -- 1.7.9.5