GNOME Bugzilla – Bug 784421
Tooltips: Fix docs/theming for custom tooltip windows
Last modified: 2018-05-02 18:40:18 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.
Created attachment 354764 [details] [review] widget: Remove obsolete comment on tooltip colour Tooltips are not usually yellow anymore.
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
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!
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
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.
Created attachment 357586 [details] [review] Widget: Fix outdated comments about tooltips let's try that again with a clean working directory
-- 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.