Closed
Bug 1218008
Opened 10 years ago
Closed 10 years ago
GTK <progress> widget is unusable with GTK3 on Ubuntu 15.10 ("thumb" is same color as background), with "Ambiance" & "Radiance" themes
Categories
(Core :: Widget: Gtk, defect)
Core
Widget: Gtk
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: dholbert, Unassigned)
References
Details
Attachments
(4 files, 1 obsolete file)
|
85.67 KB,
image/png
|
Details | |
|
45.90 KB,
video/ogg
|
Details | |
|
77 bytes,
text/html
|
Details | |
|
2.79 KB,
patch
|
karlt
:
review+
lizzard
:
approval-mozilla-aurora+
lizzard
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
STR:
1. Load this data URL:
data:text/html,<progress>
2. Look at the colors.
ACTUAL RESULTS:
Really hard to distinguish "thumb" from background. Both are light-gray (the same color I think), and they're separated by an extremely thin orange halo.
EXPECTED RESULTS:
Useful colors in <progress> bar.
NOTES:
- I can reproduce this in Nightly 44, but not in Release (41), so I'm pretty sure this is a regression from the switch to GTK3.
- I can reproduce this on Ubuntu 15.10, but not on Ubuntu 15.04 (using Nightly in both). So there's some theme dependency here.
| Reporter | ||
Updated•10 years ago
|
Summary: GTK <progress> widget "thumb" is same color as background → GTK <progress> widget is unusable with GTK3 on Ubuntu 15.10 ("thumb" is same color as background)
| Reporter | ||
Comment 1•10 years ago
|
||
| Reporter | ||
Comment 2•10 years ago
|
||
Data URL used in the screenshot is:
data:text/html,<progress value="0.8">
but you can see this with any <progress> widget.
| Reporter | ||
Comment 3•10 years ago
|
||
Here's a screencast showing how this looks with the bouncing <progress> animation.
| Reporter | ||
Comment 4•10 years ago
|
||
Results from changing my theme using gnome-tweak-tool:
THEME BUG/No bug NOTES
===== ========== =====
"Ambiance" BUG This is Ubuntu's default theme, IIUC. (It's what was set for me.)
"Radiance" BUG (similar to Ambiance, per bug 1187203.)
"Adwaita" No bug Solid blue thumb on gray background. Great!
(This is Gnome's default, I think, though Ubuntu's selection overrides it.)
Summary: GTK <progress> widget is unusable with GTK3 on Ubuntu 15.10 ("thumb" is same color as background) → GTK <progress> widget is unusable with GTK3 on Ubuntu 15.10 ("thumb" is same color as background), with "Ambiance" & "Radiance" themes
| Reporter | ||
Comment 5•10 years ago
|
||
I was wondering if the reason this repro's on Ubuntu 15.10 not Ubuntu 15.04 was due to a difference in the theme CSS. But I don't think that's the case.
I tested that by replacing my Ubuntu 15.10 ambiance GTK3 theme directory (/usr/share/themes/Ambiance/gtk-3.0/) with the same directory taken from an Ubuntu 15.04 machine, and restarting Firefox. That didn't fix this or have any noticeable impact at all. (And if this were a theme-CSS issue, I'd expect it to have had an impact, based on bug 1187203 comment 15.)
So, this is a bit mysterious.
| Reporter | ||
Comment 6•10 years ago
|
||
One other theory that I considered as an explanation for the 15.04-vs-15.10 difference, but I think I've shot down:
* We draw progressbar chunks differently based on GTK version:
> 2059 gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
> 2060 // gtk_render_activity was used to render progress chunks on GTK versions
> 2061 // before 3.13.7, see bug 1173907.
> 2062 if (gtk_check_version(3, 13, 7))
> 2063 gtk_render_activity(style, cr, rect->x, rect->y, rect->width, rect->height);
http://mxr.mozilla.org/mozilla-central/source/widget/gtk/gtk3drawing.c#2012
If Ubuntu versions took different codepaths there based on GTK version, that would explain this... but alas, both Ubuntu versions have a GTK version that's newer than the one checked there. (libgtk-3-0 package version is 3.14.12 on my Ubuntu 15.04 box, 3.16.7 on my Ubuntu 15.10 box.)
So, I don't know what explains the difference in behavior.
| Reporter | ||
Comment 7•10 years ago
|
||
(IMO we should consider having this bug block the shipping of GTK3, since it makes one of our widgets pretty useless, with default theme settings on the latest version of the most popular (I think?) linux distro. Marking as blocking 'ship-gtk3' for the moment.)
Blocks: ship-gtk3
| Comment hidden (obsolete) |
| Reporter | ||
Updated•10 years ago
|
Attachment #8678380 -
Attachment filename: file_1218008.txt → file_1218008.html
Attachment #8678380 -
Attachment mime type: text/plain → text/html
| Reporter | ||
Updated•10 years ago
|
Attachment #8678380 -
Attachment is obsolete: true
| Reporter | ||
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
The main issue here appears to be that the progress bar widget has the "trough" style class by default, which interferes with rendering expectations. Upstream GTK explicitly removes this style class before rendering a progress chunk (see gtkprogressbar.c). I've also added a call to gtk_render_frame to be consistent.
Lastly, this patch avoids drawing a progress bar chunk background on GTK versions before 3.13.7- older draw implementations didn't call it anyway. See GTK commit 6c06bd55dae61ce6066555c7d4794ed9ca3911de.
Thanks!
Attachment #8678432 -
Flags: review?(karlt)
Updated•10 years ago
|
Attachment #8678432 -
Flags: review?(karlt) → review+
Comment 11•10 years ago
|
||
Comment 12•10 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 13•10 years ago
|
||
| bugherder uplift | ||
status-b2g-v2.5:
--- → fixed
Comment 15•10 years ago
|
||
Comment on attachment 8678432 [details] [diff] [review]
Fix progress bar rendering on the Ambiance GTK3 theme.
Approval Request Comment
[Feature/regressing bug #]: gtk3
[User impact if declined]: Progress bar sliders will be difficult to see on Ubuntu 15.04's default theme.
[Describe test coverage new/current, TreeHerder]: This bug does not occur on test infrastructure, as the theme used on test slaves does not trigger this implementation bug.
[Risks and why]: No known risks.
[String/UUID change made/needed]: N/A
Attachment #8678432 -
Flags: approval-mozilla-beta?
Updated•10 years ago
|
status-firefox43:
--- → affected
Comment 16•10 years ago
|
||
Comment on attachment 8678432 [details] [diff] [review]
Fix progress bar rendering on the Ambiance GTK3 theme.
We need this on 44 also.
This is a small patch that makes a big difference to this widget, fixing bug 1221498 also.
Attachment #8678432 -
Flags: approval-mozilla-aurora?
Comment 17•10 years ago
|
||
Comment on attachment 8678432 [details] [diff] [review]
Fix progress bar rendering on the Ambiance GTK3 theme.
GTK3 fix, approved for beta and aurora.
Attachment #8678432 -
Flags: approval-mozilla-beta?
Attachment #8678432 -
Flags: approval-mozilla-beta+
Attachment #8678432 -
Flags: approval-mozilla-aurora?
Attachment #8678432 -
Flags: approval-mozilla-aurora+
Comment 18•10 years ago
|
||
| bugherder uplift | ||
Comment 19•10 years ago
|
||
| bugherder uplift | ||
Comment 20•10 years ago
|
||
| bugherder uplift | ||
You need to log in
before you can comment on or make changes to this bug.
Description
•