Skip to content

Commit

Permalink
Gtk-3.20&3.22&4.0: [GtkTooltip] Add workaround for EclipseNeon
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tista500 committed Jul 29, 2017
1 parent ab3b97f commit e6642de
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 23 deletions.
16 changes: 9 additions & 7 deletions gtk/sass/3.20/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
21 changes: 13 additions & 8 deletions gtk/sass/3.22/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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
Expand Down
21 changes: 13 additions & 8 deletions gtk/sass/4.0/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e6642de

Please sign in to comment.