Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

fix: tooltip #243

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ def apply_colloid_patches():
logger.info("Applying patches...")
# Change into colloid
for patch in [
"fix-tooltip.patch",
"plank-dark.patch",
"plank-light.patch",
"theme-func.patch",
Expand Down
90 changes: 90 additions & 0 deletions patches/colloid/fix-tooltip.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
diff --git a/src/sass/_colors.scss b/src/sass/_colors.scss
index 8738bf37..432a0596 100644
--- a/src/sass/_colors.scss
+++ b/src/sass/_colors.scss
@@ -125,7 +125,7 @@ $surface: if($variant == 'light', background(a), b
$base: if($variant == 'light', background(a), background(g));
$base-alt: if($variant == 'light', background(b), background(f));

-$tooltip: if($variant == 'dark', rgba(darken(background(e), 3%), 0.9), rgba(darken(background(h), 3%), 0.9));
+$tooltip: $grey-100;
$osd: background(e);
$scrim: background(f);
$scrim-alt: background(g);
diff --git a/src/sass/gtk/_common-3.0.scss b/src/sass/gtk/_common-3.0.scss
index 0b6df5b8..ae7d0cbb 100644
--- a/src/sass/gtk/_common-3.0.scss
+++ b/src/sass/gtk/_common-3.0.scss
@@ -231,7 +231,7 @@ label {
&.osd {
border-radius: $corner-radius;
background-color: $tooltip;
- color: on($tooltip);
nullishamy marked this conversation as resolved.
Show resolved Hide resolved
+ color: $grey-800;
}
}

@@ -3544,7 +3544,7 @@ tooltip {
// 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.
background-color: $tooltip;
- color: on($tooltip);
+ color: $grey-800;
border-radius: $corner-radius;
}

diff --git a/src/sass/gtk/_common-4.0.scss b/src/sass/gtk/_common-4.0.scss
index 09436043..f60a013a 100644
--- a/src/sass/gtk/_common-4.0.scss
+++ b/src/sass/gtk/_common-4.0.scss
@@ -4869,7 +4869,7 @@ tooltip {
// 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.
background-color: $tooltip;
- color: on($tooltip);
+ color: $grey-800;
box-shadow: $shadow-z5;
border-radius: $corner-radius;
margin: 2px 6px 8px 6px;
@@ -4877,7 +4877,7 @@ tooltip {

padding: $space-size $space-size * 2;
box-shadow: none; // otherwise it gets inherited by windowframe.csd
- border: none;
+ border: $grey-650;

> box {
border-spacing: $space-size;
diff --git a/src/sass/libadwaita/_colors.scss b/src/sass/libadwaita/_colors.scss
index 3128744b..cb2cf82a 100644
--- a/src/sass/libadwaita/_colors.scss
+++ b/src/sass/libadwaita/_colors.scss
@@ -118,7 +118,7 @@ $osd_focus_color: transparentize(white, .5);
$osd_link_color: gtkmix($accent_bg_color, $osd_text_color, 50%);
$osd_link_visited_color: gtkmix($accent_bg_color, $osd_text_color, 75%);

-$tooltip_border_color: transparentize(white, 0.9);
+$tooltip_border_color: $grey-650;
$shadow_color: transparentize(black, 0.9);

$drop_target_color: $accent_bg_color;
diff --git a/src/sass/libadwaita/widgets/_tooltip.scss b/src/sass/libadwaita/widgets/_tooltip.scss
index 2ed45776..c8450fee 100644
--- a/src/sass/libadwaita/widgets/_tooltip.scss
+++ b/src/sass/libadwaita/widgets/_tooltip.scss
@@ -2,12 +2,12 @@ tooltip {
&.background {
// 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.
- background-color: transparentize(black, 0.2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these colours are right for mocha etc. 750 is mantle, and i think we just use $white for text?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$white is a hardcoded value

+$white: #eff1f5;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but white and $white are two very different things, you have the former in this case? Did you mean to put the latter in?

+ background-color: $grey-100; // cappuccin mantle
background-clip: padding-box;
border: 1px solid $tooltip_border_color; // this subtle border is meant to
// not make the tooltip melt with
// very dark backgrounds
- color: white;
+ color: $grey-800; // catppuccin text
}

padding: 6px 10px;