#3836 closed defect (fixed)
Palette Icon: drawn with grey background
Reported by: | erikos | Owned by: | erikos |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | 0.97.x |
Severity: | Major | Keywords: | shell-port 13.1.0 |
Cc: | Distribution/OS: | Fedora | |
Bug Status: | New |
Description
There is a GtkEventBox around the icon at the upper left in the Palette.
This gets the default background color with the latest changes in GTK+ 3 (css style theme).
This should work (though I wonder if this Eventbox is needed actually):
diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em index 96aa3fa..6bd634e 100644 --- a/gtk3/theme/gtk-widgets.css.em +++ b/gtk3/theme/gtk-widgets.css.em @@ -557,6 +557,11 @@ SugarPaletteWindowWidget GtkScrolledWindow * { background-color: @black; } +SugarPaletteWindowWidget GtkEventBox { + background-color: transparent; +} + + /* Scales */ GtkScale {
Change History (7)
comment:1 Changed 11 years ago by dsd
- Keywords 13.1.0 added
comment:2 Changed 11 years ago by manuq
comment:3 Changed 11 years ago by manuq
The globals removal patch will remove the grey background square. However we still have a greyish icon. This is because in palette get_menu() we mark the menuitem as insensitive, if that line is removed we get the bright icon again:
--- a/src/sugar3/graphics/palette.py +++ b/src/sugar3/graphics/palette.py @@ -384,7 +384,6 @@ class Palette(PaletteWindow): # Mark the menuitem as insensitive so that it appears as an # informational element, rather than a clickable item in the menu. # TODO: see if we can do this better in GTK. - self._label_menuitem.set_sensitive(False) self._label_menuitem.show() self._widget.append(self._label_menuitem)
Then at the icon, the _IconBuffer method _get_insensitive_pixbuf() is returning the greyed out graphic.
If that menuitem is set insensitive because of styling, then if possible the insensitive should be removed and this should be done in the theme. I was trying to do it (without success yet):
SugarPaletteMenuWidget .menuitem:prelight:first-child { background-color: transparent; }
Or an easier fix is add a custom gtype_name to style it.
comment:4 Changed 11 years ago by manuq
We can change the background color of the menuitem instead of setting it insensitive. This does work:
- self._label_menuitem.set_sensitive(False) + self._label_menuitem.modify_bg(Gtk.StateType.NORMAL, + style.COLOR_BLACK.get_gdk_color())
comment:5 Changed 11 years ago by manuq
- Resolution set to fixed
- Status changed from new to closed
Fixed, at the same time with #3879 .
comment:6 Changed 10 years ago by dnarvaez
- Component changed from sugar-toolkit-gtk3 to Sugar
Does this still happen if you apply the globals removal patch?
By the way I'm checking if is better to remove the Gtk.EventBox.