From e6642defaebac93bb51824ab3a1bde3e397dad93 Mon Sep 17 00:00:00 2001 From: tista500 Date: Sun, 30 Jul 2017 05:02:32 +0900 Subject: [PATCH] Gtk-3.20&3.22&4.0: [GtkTooltip] Add workaround for EclipseNeon We can not accept for their tooltip design at all (which contains GtkTreeView and/or GtkTextView?). Totally upstream design issue... Anyway I've stopped tracking this down anymore. This commit may or may not fix the issue: #470. --- gtk/sass/3.20/_common.scss | 16 +++++++++------- gtk/sass/3.22/_common.scss | 21 +++++++++++++-------- gtk/sass/4.0/_common.scss | 21 +++++++++++++-------- 3 files changed, 35 insertions(+), 23 deletions(-) diff --git a/gtk/sass/3.20/_common.scss b/gtk/sass/3.20/_common.scss index 5b2a30166..9303848b5 100644 --- a/gtk/sass/3.20/_common.scss +++ b/gtk/sass/3.20/_common.scss @@ -5568,24 +5568,26 @@ infobar { .tooltip, // metacity needs style-class tooltip { &.background { + border: 1px solid gtkopacity($inverted_dark_color, 0.9); // background-color needs to be set this way otherwise it gets drawn twice // see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details. - border: 1px solid gtkopacity($inverted_dark_color, 0.9); - background-color: gtkopacity($inverted_dark_color, 0.9); + // + // FIXME: Eclipse specific tooltip widgets needs non-inverted backgrounds + // even if aplha-value was 0.1%, so real backgrounds are drawin with + // background-image property instead. + background-color: gtkopacity($base_color, 0.001); + background-image: image(gtkopacity($inverted_dark_color, 0.901)); background-clip: padding-box; } - color: $inverted_fg_color; padding: rem(4px); box-shadow: none; // otherwise it gets inherited by windowframe.csd // FIXME: we need a border or tooltips vanish on black background. decoration { background-color: transparent; } - * { // Yeah this is ugly - background-color: transparent; - color: $inverted_fg_color; - } + label, + image { color: $inverted_fg_color; } // default foregrounds // use roundness only for CSDs &.csd { border-radius: 2px; } diff --git a/gtk/sass/3.22/_common.scss b/gtk/sass/3.22/_common.scss index e608ee5a7..835a8b88c 100644 --- a/gtk/sass/3.22/_common.scss +++ b/gtk/sass/3.22/_common.scss @@ -5561,24 +5561,26 @@ infobar { tooltip { &.background { + border: 1px solid gtkopacity($inverted_dark_color, 0.9); // background-color needs to be set this way otherwise it gets drawn twice // see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details. - border: 1px solid gtkopacity($inverted_dark_color, 0.9); - background-color: gtkopacity($inverted_dark_color, 0.9); + // + // FIXME: Eclipse specific tooltip widgets needs non-inverted backgrounds + // even if aplha-value was 0.1%, so real backgrounds are drawin with + // background-image property instead. + background-color: gtkopacity($base_color, 0.001); + background-image: image(gtkopacity($inverted_dark_color, 0.901)); background-clip: padding-box; } - color: $inverted_fg_color; padding: rem(4px); box-shadow: none; // otherwise it gets inherited by windowframe.csd // FIXME: we need a border or tooltips vanish on black background. decoration { background-color: transparent; } - * { // Yeah this is ugly - background-color: transparent; - color: $inverted_fg_color; - } + label, + image { color: $inverted_fg_color; } // default foregrounds // use roundness only for CSDs &.csd { border-radius: 2px; } @@ -6423,7 +6425,10 @@ popover.touch-selection { font-weight: 700; // shortcut keycaps for Gnome-builder - tooltip.background & { background-color: $suggested_color; } + tooltip.background & { + background-color: $suggested_color; + color: $selected_fg_color; + } } // shortcut-window diff --git a/gtk/sass/4.0/_common.scss b/gtk/sass/4.0/_common.scss index 9490f6dc0..7b625c42c 100644 --- a/gtk/sass/4.0/_common.scss +++ b/gtk/sass/4.0/_common.scss @@ -5478,24 +5478,26 @@ infobar { tooltip { &.background { + border: 1px solid gtkopacity($inverted_dark_color, 0.9); // background-color needs to be set this way otherwise it gets drawn twice // see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details. - border: 1px solid gtkopacity($inverted_dark_color, 0.9); - background-color: gtkopacity($inverted_dark_color, 0.9); + // + // FIXME: Eclipse specific tooltip widgets needs non-inverted backgrounds + // even if aplha-value was 0.1%, so real backgrounds are drawin with + // background-image property instead. + background-color: gtkopacity($base_color, 0.001); + background-image: image(gtkopacity($inverted_dark_color, 0.901)); background-clip: padding-box; } - color: $inverted_fg_color; padding: rem(4px); box-shadow: none; // otherwise it gets inherited by windowframe.csd // FIXME: we need a border or tooltips vanish on black background. decoration { background-color: transparent; } - * { // Yeah this is ugly - background-color: transparent; - color: $inverted_fg_color; - } + label, + image { color: $inverted_fg_color; } // default foregrounds // use roundness only for CSDs &.csd { border-radius: 2px; } @@ -6319,7 +6321,10 @@ popover.touch-selection { font-weight: 700; // shortcut keycaps for Gnome-builder - tooltip.background & { background-color: $suggested_color; } + tooltip.background & { + background-color: $suggested_color; + color: $selected_fg_color; + } } // shortcut-window