[Bugs] #4279 sugar-toolkit-gtk3 NORM: tray items not always left aligned

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Wed Dec 12 08:18:39 EST 2012


#4279: tray items not always left aligned
-----------------------------------+----------------------------------------
    Reporter:  erikos              |          Owner:  humitos       
        Type:  defect              |         Status:  accepted      
    Priority:  Normal              |      Milestone:  0.98          
   Component:  sugar-toolkit-gtk3  |        Version:  0.97.x        
    Severity:  Minor               |       Keywords:  regression, r?
Distribution:  OLPC                |   Status_field:  Assigned      
-----------------------------------+----------------------------------------

Comment(by manuq):

 The issue happens because the tray is not visible, so when the size-
 allocate callback is called for the first time, it's size is unknown, and
 it is set to 1x1 as the documentation say:

 http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-size-
 allocate

 Adding a show() in Browse tray fixes the issue if you resume a Browse
 instance that has the tray already displayed.  But this breaks the Browse
 functionality (tray hidden by default).

 {{{
 --- a/webactivity.py
 +++ b/webactivity.py
 @@ -178,6 +178,7 @@ class WebActivity(activity.Activity):

          self._tray = HTray()
          self.set_tray(self._tray, Gtk.PositionType.BOTTOM)
 +        self._tray.show()

          self._primary_toolbar = PrimaryToolbar(self._tabbed_view, self)
          self._edit_toolbar = EditToolbar(self)
 }}}

 So I think we are good adding the conditional for the 1x1 size case as per
 humitos patch, with a better comment.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/4279#comment:5>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list