Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#3987 closed defect (fixed)

Subtoolbar: background is black

Reported by: erikos Owned by: manuq
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: 0.97.x
Severity: Blocker Keywords: r+, olpc-test-passed
Cc: erikos Distribution/OS: OLPC
Bug Status: Assigned

Description (last modified by manuq)

seen in os5, artwork 0.97.5. see #3890 for the previous issue.

TestCase 1:

do the following sequence in a button with a subtoolbar

  • hover, subtoolbar appears -> background should be black
  • press -> background should change to dark grey
  • press again, subtoolbar dissapears
  • move the pointer outside, then hover again -> background should be black
  • press -> background should change to dark grey

TestCase 2:

  • press the button directly, without letting the subtoolbar appears by hover -> subtoolbar should be dark grey

Attachments (4)

0001-Set-correct-background-for-subtoolbars-SL-3987.patch (1.9 KB) - added by manuq 8 years ago.
Candidate patch.
0001-Set-correct-background-for-subtoolbars-SL-3987.2.patch (7.3 KB) - added by manuq 8 years ago.
Better patch, that does the styling in the theme
0001-Style-toolbar-containers-and-toolbar-inside-palette-.patch (1.3 KB) - added by manuq 8 years ago.
Artwork patch that accompanies the previous.
0001-Set-correct-background-v2.patch (1.4 KB) - added by manuq 8 years ago.
Modification of the first patch which passes both testcases. Would be nicer to do the theme change in one go, but maybe later. Fixing the bug for now.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by manuq

Commenting out self.set_app_paintable(True) in _Box class, toolbarbox.py, makes the background display correctly again. But has a drawback: the toolbar outline drawn in the do_draw method is not visible.

According to the set_app_paintable documentation, in our case, a GtkEventBox, "the effect is to suppress default themed drawing of the widget's background. (Children of the widget will still be drawn.) The application is then entirely responsible for drawing the widget background".

Changed 8 years ago by manuq

Candidate patch.

Changed 8 years ago by manuq

Better patch, that does the styling in the theme

Changed 8 years ago by manuq

Artwork patch that accompanies the previous.

comment:2 Changed 8 years ago by manuq

  • Cc erikos added
  • Keywords r? added

The last two patches do the work properly, imho.

comment:3 Changed 8 years ago by erikos

If I am correct the desired colouring for the subtoolbar is black on hover and toolbar color in locked mode.

One issue seems to still be there: if I open an Activity (e.g. Browse) and click on an icon to lock in a subtoolbar it will be black. This subtoolbar stays black even if I lock other subtoolbars and switch back.

comment:4 Changed 8 years ago by manuq

  • Description modified (diff)

Good catch Simon, adding two testcases. The first one the patch passes it, but you discovered the second one doesn't. Giving another round then.

Changed 8 years ago by manuq

Modification of the first patch which passes both testcases. Would be nicer to do the theme change in one go, but maybe later. Fixing the bug for now.

comment:5 Changed 8 years ago by manuq

  • Keywords r+ olpc-test-pending added; r? removed
  • Resolution set to fixed
  • Status changed from new to closed

Pushed the last one as 25497c76 .

comment:6 Changed 8 years ago by greenfeld

  • Keywords olpc-test-passed added; olpc-test-pending removed

A hovered-over toolbar selection icon is black in Sugar 0.98.3, and toolbar-colored otherwise. The sub-toolbar is black if opened in hover mode and a slightly lighter gray (matching the main toolbar) if locked open.

If touched via a finger the toolbar selection icon is highlighted in gray, matching the gray color used to highlight touches elsewhere (unknown if intentional).

comment:7 Changed 8 years ago by dnarvaez

  • Component changed from sugar-artwork to Sugar

comment:8 Changed 8 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.