[Sugar-devel] [PATCH sugar] Journal, no-hippo: set white background for no-matching-entry message, SL #3808

Manuel Quiñones manuq at laptop.org
Thu Aug 16 08:33:50 EDT 2012


Yes as we've been discussing, this should be done in the theme in
GTK+3.  But as this is not possible yet without wrapping a
GtkEventBox, this solution is more than welcome.

2012/8/16 Simon Schampijer <simon at schampijer.de>:
> The 'no-matching-entry' message in the Journal listview is
> grey after the hippo removal.
>
> Add a gtk.EventBox because the gtk.VBox doesn't have a
> gtk.gdk.Window associated with it and the background
> can't be set otherwise. See d9fbf9d for the same resolution
> of the issue.
>
> Signed-off-by: Simon Schampijer <simon at laptop.org>

Acked-by: Manuel Quiñones <manuq at laptop.org>

> ---
>  src/jarabe/journal/listview.py | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
> index f6a867f..e3f8745 100644
> --- a/src/jarabe/journal/listview.py
> +++ b/src/jarabe/journal/listview.py
> @@ -371,11 +371,18 @@ class BaseListView(gtk.Bin):
>          self._progress_bar = None
>
>      def _show_message(self, message, show_clear_query=False):
> -        box = gtk.VBox()
>          self.remove(self.child)
>
> +        background_box = gtk.EventBox()
> +        background_box.modify_bg(gtk.STATE_NORMAL,
> +                                 style.COLOR_WHITE.get_gdk_color())
> +        self.add(background_box)
> +
>          alignment = gtk.Alignment(0.5, 0.5, 0.1, 0.1)
> -        self.add(alignment)
> +        background_box.add(alignment)
> +
> +        box = gtk.VBox()
> +        alignment.add(box)
>
>          icon = EventIcon(pixel_size=style.LARGE_ICON_SIZE,
>                           icon_name='activity-journal',
> @@ -396,8 +403,7 @@ class BaseListView(gtk.Bin):
>                                        icon_size=gtk.ICON_SIZE_BUTTON)
>              box.pack_start(button, expand=True, fill=False)
>
> -        alignment.add(box)
> -        alignment.show_all()
> +        background_box.show_all()
>
>      def __clear_button_clicked_cb(self, button):
>          self.emit('clear-clicked')
> --
> 1.7.11.4
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
.. manuq ..


More information about the Sugar-devel mailing list