Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
To: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] propertydialog.py : Scrollable windows for long tooltips
Date: Wed, 15 May 2013 12:52:51 +0300	[thread overview]
Message-ID: <51935AF3.3060907@intel.com> (raw)
In-Reply-To: <1368611468-14420-1-git-send-email-andrei.adrianx.dinu@intel.com>

Please ignore this patch.

Thanks.

On 05/15/2013 12:51 PM, Andrei Dinu wrote:
> 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 <andrei.adrianx.dinu@intel.com>
> ---
>   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("<b>" + summary + "</b>")
>                           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("<span weight=\"bold\">Name: </span>" + 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("<span weight=\"bold\">Version: </span>" + 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("<span weight=\"bold\">Revision: </span>" + 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("<span weight=\"bold\">Group: </span>" + 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("<b>Homepage: </b>")
> @@ -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("<b>Bugtracker: </b>")
> @@ -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("<span weight=\"bold\">Brought in by: </span>")
>                           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()




  reply	other threads:[~2013-05-15 10:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15  9:51 [PATCH] propertydialog.py : Scrollable windows for long tooltips Andrei Dinu
2013-05-15  9:52 ` Andrei Dinu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-15  9:59 Andrei Dinu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51935AF3.3060907@intel.com \
    --to=andrei.adrianx.dinu@intel.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox