Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#3890 closed defect (fixed)

Style subtoolbar background

Reported by: manuq Owned by: manuq
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: 0.97.x
Severity: Blocker Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Assigned

Description

We have a Gtk.Toolbar inside a Gtk.Alignment inside a Gtk.EventBox (see toolbarbox.py embed_page function). The Gtk.Toolbar gets the correct color, but not the area around. One solution is modify the EventBox color:

--- a/src/sugar3/graphics/toolbarbox.py
+++ b/src/sugar3/graphics/toolbarbox.py
@@ -270,6 +270,8 @@ class _Box(Gtk.EventBox):
         GObject.GObject.__init__(self)
         self.set_app_paintable(True)
         self._toolbar_button = toolbar_button
+        self.modify_bg(Gtk.StateType.NORMAL,
+                       style.COLOR_TOOLBAR_GREY.get_gdk_color())
 
     def do_draw(self, cr):
         button_alloc = self._toolbar_button.get_allocation()

That is close to a solution, but also the background should be modified to black when the toolitem is hovered.

Attachments (3)

subtoolbar_bg-issue.png (9.8 KB) - added by manuq 12 years ago.
Screenshot that shows the issue.
subtoolbar_bg-correct.png (9.3 KB) - added by manuq 12 years ago.
Setting the Gtk.EventBox background color.
subtoolbar_bg-hover.png (9.6 KB) - added by manuq 12 years ago.
Hover in the toolitem should be fixed too. Note there are two colors, black and dark grey.

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by manuq

Screenshot that shows the issue.

Changed 12 years ago by manuq

Setting the Gtk.EventBox background color.

Changed 12 years ago by manuq

Hover in the toolitem should be fixed too. Note there are two colors, black and dark grey.

comment:1 Changed 12 years ago by manuq

This happens only the first time the subtoolbar is expanded, via a click on the toolbutton. The other times the modify_bg in _setup_page is applied well. And doesn't happen if the subtoolbar is expanded via a hover in the toolbutton.

comment:2 Changed 12 years ago by erikos

  • Bug Status changed from Unconfirmed to Assigned
  • Component changed from untriaged to sugar-toolkit-gtk3
  • Milestone changed from Unspecified by Release Team to 0.98
  • Owner set to manuq
  • Severity changed from Unspecified to Blocker
  • Status changed from new to assigned
  • Version changed from Unspecified to 0.97.x

comment:3 Changed 12 years ago by manuq

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

Pushed as to the gtk3 toolkit as 7fc29c9d .

comment:4 Changed 11 years ago by dnarvaez

  • Component changed from sugar-toolkit-gtk3 to Sugar

comment:5 Changed 11 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.