New issue
Advanced search Search tips

Issue 822446 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Tooltips on Linux are sometimes white-on-yellow

Project Member Reported by derat@chromium.org, Mar 15 2018

Issue description

Google Chrome	65.0.3325.162 (Official Build) (64-bit)
Revision	5d04e9e9c8ce31bee0923a8c326a7e9e19c492a3-refs/branch-heads/3325@{#695}
OS	Linux

Since switching to rodete (I think), I've noticed that Chrome sometimes displays tooltips as white-on-yellow instead of the white-on-dark-gray that I'm used to.

I still sometimes see the correct background color in tooltips, and interestingly, I'm currently seeing yellow-backed tooltips for one window and gray-backed tooltips for another window, both of which are part of the same Chrome session and profile. I have no idea where the yellow color is coming from or what determines when it's used.

My ~/.config/gtk-3.0 is symlinked to /usr/share/themes/Clearlooks-Phenix/gtk-3.0, which is installed by clearlooks-phenix-theme 7.0.1-1. Its gtk.css file contains the following:

@define-color theme_tooltip_bg_color #f5f5b5;
@define-color theme_tooltip_fg_color #000000;

gtk-widgets.css contains this:

tooltip,
tooltip.background,
.tooltip,
.tooltip.background {
        padding: 4px;
        border-style: solid;
        border-width: 1px;
        border-color: @theme_tooltip_border_color;
        border-radius: 0px;
        background-color: @theme_tooltip_bg_color;
        color: @theme_tooltip_fg_color;
}

It's been a while since I've thought about GTK themes, but it looks like the background color is actually supposed to be yellow at all times, with black text.

Looking through the Chrome code, I assume that this is coming from chrome/browser/ui/libgtkui/native_theme_gtk3.cc:

---

ScopedStyleContext GetTooltipContext() {
  return AppendCssNodeToStyleContext(
      nullptr, GtkVersionCheck(3, 20) ? "#tooltip.background"
                                      : "GtkWindow#window.background.tooltip");
}

...

    case ui::NativeTheme::kColorId_TooltipBackground:
      return GetBgColorFromStyleContext(GetTooltipContext());
    case ui::NativeTheme::kColorId_TooltipText: {
      auto context = GetTooltipContext();
      context = AppendCssNodeToStyleContext(context, "GtkLabel");
      return GetFgColorFromStyleContext(context);

---

 Issue 716599  may be related.
 
gray.png
2.6 KB View Download
yellow.png
3.4 KB View Download

Comment 1 by derat@chromium.org, Mar 15 2018

Oh, and my system has libgtk-3-0:amd64 3.22.24-3.
Owner: thomasanderson@chromium.org
Status: Assigned (was: Untriaged)
Labels: Hotlist-DesktopUIToolingRequired Hotlist-DesktopUIChecked

Sign in to add a comment