Bug 1202100

Summary: [GTK3] tooltips doesn't honor settings in themes
Product: [Fedora] Fedora Reporter: Wolfgang Ulbrich <raveit65.sun>
Component: mate-themesAssignee: Wolfgang Ulbrich <raveit65.sun>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: ccecchi, dan.mashal, gecko-bugs-nobody, mclasen, raveit65.sun, stransky
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mate-themes-1.10.0-0.3.git20150320.488e77b.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-29 05:04:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
firefox
none
gedit
none
testcase
none
test-app
none
test app with expected background none

Description Wolfgang Ulbrich 2015-03-15 12:36:32 UTC
Description of problem:

I quess firefox is compiled with GTK3 in f22, right?
All tooltips in firefox GTK3 has now a dark background color but it's impossible to set it with gtk-widgets.css in a theme.
Ie. BlueMenta theme from mate desktop. Here i use those settings to set the tooltips.

.tooltip {
	padding: 4px;
	border-style: solid;
	border-width: 1px;
	border-color: shade(@theme_tooltip_bg_color, 0.50);
	border-radius: 0px;
	background-color: @theme_tooltip_bg_color;
	color: @theme_tooltip_fg_color;
	text-shadow: none;
}

Here i use a yellow background (background-color:) with black font-color (color:) for tooltips.
Firefox accept only the setting for the font color but not for the background, in result you have a dark font-color on a dark background inside firefox for tooltips.
Using 'gtk3-inspector' shows me that firefox has only one widget called 'MozContainer' but none style classes for using in themes.
Normaly, gtk3-inspector shows several widgets and style classes for an application, which shows me that firefox GTK3 version isn't ready developed.
Don't understand me wrong, but as a theme developer for mate desktop i'm searching for an solution to fix this issue.
Shure, i can change the font-color for tooltips to white, but that changed the style of notification for all other applications, which is whorse.
Before you say 'but in adwaita or other themes is everything OK, this is a coincidence ;)
Because adwaita use a black background with white font-color already for tooltips.

So, is there a firefox developer irc channel or mailing list where i can find help?

Comment 1 Martin Stransky 2015-03-17 13:19:26 UTC
Does other Gtk3 applications honour the tooltip background? If so that should be fixed in Firefox.

Comment 2 Wolfgang Ulbrich 2015-03-17 15:46:33 UTC
Yes, other GTK3 apps displays the tooltips well.
2 sreenshots (gedit and firefox) with Bluementa theme in f22

Comment 3 Wolfgang Ulbrich 2015-03-17 15:59:56 UTC
Created attachment 1002851 [details]
firefox

Comment 4 Wolfgang Ulbrich 2015-03-17 16:00:46 UTC
Created attachment 1002852 [details]
gedit

Comment 5 Martin Stransky 2015-03-19 13:36:10 UTC
Actually it looks like a bug in Gtk rendering engine. The tooltip background is not controlled by Firefox but it's rendered by gtk_render_background()/gtk_render_frame() sequence.

Comment 6 Martin Stransky 2015-03-19 13:56:50 UTC
Created attachment 1003849 [details]
testcase

Can you please test this sample? build by:

gcc -o test2 -g -O0 test2.c `pkg-config --libs --cflags gtk+-3.0`

launch ./test2 and see if the toolbox honour the theme background. Thanks!

Comment 7 Wolfgang Ulbrich 2015-03-19 15:34:28 UTC
Now i see the normal tooltip background from theme, but only if i hover the mouse over minimize/maximize/close buttons from windows-manager decoration.
Inside the test app i don't have any tooltip. Not shure if that is what expected.

Comment 8 Wolfgang Ulbrich 2015-03-19 15:35:33 UTC
Created attachment 1003873 [details]
test-app

Comment 9 Martin Stransky 2015-03-19 15:37:17 UTC
The tooltip is drawn inside the window. You should see a square drawn with tooltip color on white window background.

Comment 10 Martin Stransky 2015-03-19 15:47:15 UTC
I see the test tooltip rectangle in the app window has a white background. Is that correct?

Comment 11 Wolfgang Ulbrich 2015-03-19 15:51:12 UTC
yes, as you see in atachment the square drawn is white (should be yellow) on white window background. But i will switch to a baremetal installation to check it again.

Comment 12 Martin Stransky 2015-03-20 09:15:08 UTC
Okay, moving to Gtk team.

Comment 13 Matthias Clasen 2015-03-20 17:43:03 UTC
Testcase works as expected with Adwaita and HighContrast.

-> bug in the theme.

Try adding .background to the selector, maybe.

Comment 14 Matthias Clasen 2015-03-20 17:48:01 UTC
moving back to firefox, but most likely a theme problem. I just can't find the package and bugzilla is too slow.

Comment 15 Wolfgang Ulbrich 2015-03-20 18:09:20 UTC
Thanks Matthias,
i edited the theme settings to

.tooltip,
.tooltip.background {
	padding: 4px;
	border-style: solid;
	border-width: 1px;
	border-color: shade(@theme_tooltip_bg_color, 0.50);
	border-radius: 0px;

	background-color: @theme_tooltip_bg_color;
	color: @theme_tooltip_fg_color;

	text-shadow: none;
}

...and i see the expected yellow background in the test app.

Comment 16 Wolfgang Ulbrich 2015-03-20 18:11:42 UTC
Created attachment 1004578 [details]
test app with expected background

Comment 17 Wolfgang Ulbrich 2015-03-20 18:22:05 UTC
and i forgot to say after a restart of firefox the tooltips displays well :)
Thanks all

Comment 18 Fedora Update System 2015-03-20 22:29:48 UTC
mate-themes-1.10.0-0.2.git20150320.488e77b.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/mate-themes-1.10.0-0.2.git20150320.488e77b.fc22

Comment 19 Fedora Update System 2015-03-22 04:28:31 UTC
Package mate-themes-1.10.0-0.2.git20150320.488e77b.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mate-themes-1.10.0-0.2.git20150320.488e77b.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-4359/mate-themes-1.10.0-0.2.git20150320.488e77b.fc22
then log in and leave karma (feedback).

Comment 20 Fedora Update System 2015-03-23 07:13:54 UTC
Package mate-themes-1.10.0-0.3.git20150320.488e77b.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mate-themes-1.10.0-0.3.git20150320.488e77b.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-4359/mate-themes-1.10.0-0.3.git20150320.488e77b.fc22
then log in and leave karma (feedback).

Comment 21 Fedora Update System 2015-03-29 05:04:44 UTC
mate-themes-1.10.0-0.3.git20150320.488e77b.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.