After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784421 - Tooltips: Fix docs/theming for custom tooltip windows
Tooltips: Fix docs/theming for custom tooltip windows
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Themes
3.22.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-07-01 12:58 UTC by Daniel Boles
Modified: 2018-05-02 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
widget: Remove obsolete comment on tooltip colour (1017 bytes, patch)
2017-07-01 13:13 UTC, Daniel Boles
none Details | Review
Start fixing theming of custom tooltip windows (8.13 KB, patch)
2017-07-01 13:14 UTC, Daniel Boles
none Details | Review
Widget: Fix outdated comments about tooltips (2.42 KB, patch)
2017-08-15 01:10 UTC, Daniel Boles
none Details | Review
Widget: Fix outdated comments about tooltips (1.34 KB, patch)
2017-08-15 01:11 UTC, Daniel Boles
none Details | Review
Widget: Fix outdated comments about tooltips (1.34 KB, patch)
2017-08-15 01:14 UTC, Daniel Boles
none Details | Review
Widget: Fix outdated comments about tooltips (1.34 KB, patch)
2017-08-15 01:14 UTC, Daniel Boles
committed Details | Review

Description Daniel Boles 2017-07-01 12:58:55 UTC
The doc for gtk_widget_set_tooltip_window() refers to "the default, usually yellow, window", which is long outdated: Adwaita uses a dark transparent background in both variants, and HighContrast just uses the main theme bg colour.

Moreover, the same function doc also says this:

> If the custom window should have the default theming it needs to
> have the name “gtk-tooltip”, see gtk_widget_set_name().

This can't work as the themes never select on this ID. It should be fixed by replacing the reference to #gtk-tooltip with the class .tooltip, and ensuring the themes actually use that class to style like real tooltips (if that can be done).

A weird thing is that Adwaita only selects on the widget node named tooltip right now, but HighContrast already also includes the class .tooltip in its selectors.
Comment 1 Daniel Boles 2017-07-01 13:13:51 UTC
Created attachment 354764 [details] [review]
widget: Remove obsolete comment on tooltip colour

Tooltips are not usually yellow anymore.
Comment 2 Daniel Boles 2017-07-01 13:14:39 UTC
Created attachment 354766 [details] [review]
Start fixing theming of custom tooltip windows

Change the mention in the docs of gtk_widget_set_tooltip_window() from
the obsolete name gtk-tooltip to the style class .tooltip

Make Adwaita and HighContrast consistently apply tooltip theming to both
standard nodes having name tooltip and custom nodes with class .tooltip

This still seems to suffer from
https://bugzilla.gnome.org/show_bug.cgi?id=736155
by drawing an opague rectangular background under the desired round one.
Hopefully Lapo might know how to fix this… I didnʼt find a working combo
Comment 3 Daniel Boles 2017-08-15 01:10:16 UTC
Created attachment 357583 [details] [review]
Widget: Fix outdated comments about tooltips

They are not usually yellow anymore, the previous advice about how to
style them was for pre-3.20 versions, and the immediate replacement (CSS
class .tooltip) does not seem ready for primetime.


--

We should also bin the obsolete advice about how to get the default styling.

It doesn't seem worth documenting the likely replacement for the gtk-tooltip ID
yet, since, unless I was doing something stupid, I couldn't get a custom tooltip
to look like a normal one.

Hopefully one of the themes geniuses can help out with that!
Comment 4 Daniel Boles 2017-08-15 01:11:47 UTC
Created attachment 357584 [details] [review]
Widget: Fix outdated comments about tooltips

They are not usually yellow anymore, the previous advice about how to
style them was for pre-3.20 versions, and the immediate replacement (CSS
class .tooltip) does not seem ready for primetime.


--

Let's try that again with a clean working directory
Comment 5 Daniel Boles 2017-08-15 01:14:05 UTC
Created attachment 357585 [details] [review]
Widget: Fix outdated comments about tooltips

They are not usually yellow anymore, the previous advice about how to
style them was for pre-3.20 versions, and the immediate replacement (CSS
class .tooltip) does not seem ready for primetime.
Comment 6 Daniel Boles 2017-08-15 01:14:41 UTC
Created attachment 357586 [details] [review]
Widget: Fix outdated comments about tooltips

let's try that again with a clean working directory
Comment 7 GNOME Infrastructure Team 2018-05-02 18:40:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/846.