Closed
Bug 795812
Opened 12 years ago
Closed 12 years ago
Update gnomestripe arrow panel (doorhanger) styling for translucent windows
Categories
(Toolkit :: Themes, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: karlt, Assigned: karlt)
References
Details
Attachments
(10 files)
999 bytes,
image/png
|
Details | |
1.72 KB,
patch
|
dao
:
review+
|
Details | Diff | Splinter Review |
1.10 KB,
image/png
|
Details | |
1.11 KB,
image/png
|
Details | |
1.78 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
1.07 KB,
image/png
|
Details | |
1.04 KB,
image/png
|
Details | |
8.86 KB,
image/png
|
Details | |
8.88 KB,
image/png
|
Details | |
1.03 KB,
image/png
|
Details |
Bug 408284 is close to adding support for 0-255 alpha translucent windows on X11 systems with compositing window managers.
This will mean that alpha and color levels are treated differently and so the theming of arrow panels will need updating.
When ARGB visuals are used, it becomes clear that there are no borders around the arrows. See attachment.
Assignee | ||
Comment 1•12 years ago
|
||
This is based on the winstripe theme, but the width of the border is extended to roughly 1 pixel for consistency with the 1 pixel border around the rest of the panel. Winstripe uses a border width of 1/sqrt(2) around the arrow.
The border is intentionally centered on the 0.5,10 10,0.5 like the winstripe theme instead of on 0.7,10 10,0.7, for two reasons:
1) It theoretically aligns with the 0.5 center of the border around the rest of the panel.
2) It avoids problems when pixels are exactly half-filled. With a 0.5 alpha threshold for shaped windows, rounding errors can mean that pixels on one side of the arrow is considered transparent, while their reflections on the other are opaque.
Attachment #666446 -
Flags: review?(dao)
Assignee | ||
Comment 2•12 years ago
|
||
Assignee | ||
Comment 3•12 years ago
|
||
Not all systems with have compositing window managers.
On those systems, we'll still need to shape windows.
This is essentially a single bit 0/1 alpha channel.
I assume this is why the existing theming does not use borders.
Currently alpha > 0, even 1/255, is considered opaque, but colors are not unpremultiplied, and so pixels with low alpha end up black.
We can improve this.
Assignee | ||
Comment 4•12 years ago
|
||
This changes the threshold for considering a pixel to be transparent.
A threshold of 0.5 is rounding alpha to the nearer of 0 or 1.
Attachment #666451 -
Flags: review?(roc)
Assignee | ||
Comment 5•12 years ago
|
||
We could do better by unpremultiplying the colors, which is similar to CAIRO_OPERATOR_SATURATE but we don't need to consider the destination surface.
However, this isn't too bad.
Assignee | ||
Comment 6•12 years ago
|
||
This is the current rendering, before any patches here, for reference.
We're getting a bit lucky with this and attachment 666454 [details] because the border in this theme happens to be darker than the panel background. Current behavior would be completely wrong with light-border themes. Attachment 666451 [details] [diff] should improve things a bit there, but not fully address the issue.
Comment 7•12 years ago
|
||
How do things look if you copy the winstripe styling one-to-one?
Assignee | ||
Comment 8•12 years ago
|
||
Exactly how this looks will depend a bit on the monitor's gamma response.
The gamma curve should make the half-filled pixels look a little darker and so would help with dark borders, but make light borders look thinner.
To me, the arrow border still looks a little light compared to the rest of the panel.
Assignee | ||
Comment 9•12 years ago
|
||
Same as attachment 666447 [details], but more context to compare the rest of the panel border. The gamma curve may overdo this a touch, but to me it looks more consistent.
The difference is not major, but ...
Assignee | ||
Comment 10•12 years ago
|
||
... the exactly half filled pixels from the diagonals through pixel corners are the worst case for shaped windows where the window manager is not compositing.
A half filled pixel is not exactly representable in the 0-255 scale, so sometimes we get 127 and sometimes 128.
127 is considered transparent and so the left hand side of the arrow looks too thin, and 128 is considered opaque and so the right hand side is too heavy.
Attachment #666451 -
Flags: review?(roc) → review+
Updated•12 years ago
|
Attachment #666446 -
Flags: review?(dao) → review+
Assignee | ||
Comment 11•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=9e00d1a3cdae
https://hg.mozilla.org/integration/mozilla-inbound/rev/139ec19e88be
https://hg.mozilla.org/integration/mozilla-inbound/rev/7f2eac1712ef
Flags: in-testsuite-
Comment 12•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/139ec19e88be
https://hg.mozilla.org/mozilla-central/rev/7f2eac1712ef
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•