Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#3879 closed defect (fixed)

Style the palettes

Reported by: manuq Owned by: manuq
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: Unspecified
Severity: Unspecified Keywords: 13.1.0
Cc: erikos Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description (last modified by manuq)

Palettes need to be styled for the GTK+3 shell port.

  • correct alignments and sizes respecting the sugar cell size
  • separator below the header is not visible
  • separators should be grey and get the whole palette width

Also for the icon in the palette see #3836.

Attaching gif animations for reference.

Attachments (4)

activity_palette.gif (41.6 KB) - added by manuq 7 years ago.
Reference animation.
activity_palette2.gif (39.4 KB) - added by manuq 7 years ago.
Reference animation.
0001-Style-the-palette-menu-header-SL-3879-3836.patch (3.1 KB) - added by manuq 7 years ago.
Toolkit part of the fix.
0001-Style-general-menus-and-the-Sugar-palette-menus-SL-3.patch (1.9 KB) - added by manuq 7 years ago.
Artwork part of the fix.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by manuq

Reference animation.

Changed 7 years ago by manuq

Reference animation.

comment:1 Changed 7 years ago by manuq

This makes the activity separator the correct color and almost get all the width:

--- a/gtk3/theme/gtk-widgets.css.em
+++ b/gtk3/theme/gtk-widgets.css.em
@@ -445,14 +445,15 @@ SugarPaletteWindow SugarGroupBox *:insensitive {
     padding: 0px $(subcell_size)px;
 }
 
-.menu * {
-    color: @white;
-}
-
 .menuitem {
     padding: $(subcell_size)px $((subcell_size * 3 - font_height) / 2)px;
 }
 
+.menuitem.separator {
+    padding: $(subcell_size)px 0;
+    color: @button_grey;
+}
+
 .menuitem:prelight {
     background-color: @button_grey;
 }

comment:2 Changed 7 years ago by manuq

  • Description modified (diff)

Changed 7 years ago by manuq

Toolkit part of the fix.

Changed 7 years ago by manuq

Artwork part of the fix.

comment:3 Changed 7 years ago by manuq

The incorrect left padding for the menu header is because it's a Gtk.MenuItem, and the rest of the items are Gtk.ImageMenuItem. When you mix them, the ones without image get some padding at the left to make the labels well aligned.

The toolkit patch fixes this setting the allocation of the box inside the header toolitem.

comment:4 Changed 7 years ago by manuq

Because of the separator item added we need to add one more offset in the shell:

--- a/src/jarabe/desktop/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -511,7 +511,7 @@ class ActivityIcon(EventIcon):
 class FavoritePalette(ActivityPalette):
     __gtype_name__ = 'SugarFavoritePalette'
 
-    _PALETTE_LABEL_OFFSET = 1
+    _PALETTE_LABEL_OFFSET = 2
 
     __gsignals__ = {
         'entry-activate': (GObject.SignalFlags.RUN_FIRST,

Another approach would be to reimplement menu.insert in our menu that inherits Gtk.Menu and take care of the offset there.

comment:5 Changed 7 years ago by manuq

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in toolkit-gtk3 dbe32ec7 and artwork 29a7c920 .

comment:6 Changed 6 years ago by dnarvaez

  • Component changed from sugar-artwork to Sugar

comment:7 Changed 6 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.