diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-13 17:38:04 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-13 17:38:04 +1100 |
| commit | 6a66214b8f4ff94566ced5b535ced0d63cd6c650 (patch) | |
| tree | be7b99825e2ef128c6753cefe7ea86557e6aedcd | |
| parent | notifpopups: fix app icon (diff) | |
| download | caelestia-shell-6a66214b8f4ff94566ced5b535ced0d63cd6c650.tar.gz caelestia-shell-6a66214b8f4ff94566ced5b535ced0d63cd6c650.tar.bz2 caelestia-shell-6a66214b8f4ff94566ced5b535ced0d63cd6c650.zip | |
less border
Less border for notification popups and menu
| -rw-r--r-- | modules/notifpopups.tsx | 3 | ||||
| -rw-r--r-- | scss/_lib.scss | 6 | ||||
| -rw-r--r-- | scss/bar.scss | 2 | ||||
| -rw-r--r-- | scss/notifpopups.scss | 4 | ||||
| -rw-r--r-- | scss/widgets.scss | 14 | ||||
| -rw-r--r-- | utils/widgets.tsx | 3 |
6 files changed, 21 insertions, 11 deletions
diff --git a/modules/notifpopups.tsx b/modules/notifpopups.tsx index 8b95f98..7d92824 100644 --- a/modules/notifpopups.tsx +++ b/modules/notifpopups.tsx @@ -2,6 +2,7 @@ import { GLib, register, timeout } from "astal"; import { Astal, Gtk, Widget } from "astal/gtk3"; import AstalNotifd from "gi://AstalNotifd"; import { desktopEntrySubs } from "../utils/icons"; +import { setupChildClickthrough } from "../utils/widgets"; const urgencyToString = (urgency: AstalNotifd.Urgency) => { switch (urgency) { @@ -166,7 +167,7 @@ export default () => ( }); // Change input region to child region so can click through empty space - self.connect("size-allocate", () => self.get_window()?.set_child_input_shapes()); + setupChildClickthrough(self); }} /> </window> diff --git a/scss/_lib.scss b/scss/_lib.scss index 8c39778..df0bd50 100644 --- a/scss/_lib.scss +++ b/scss/_lib.scss @@ -11,11 +11,7 @@ $scale: 0.068rem; -gtk-outline-radius: s($tl) s($tr) s($br) s($bl); } -@mixin border($colour, $width: 1, $style: solid) { - border: s($width) $style $colour; -} - -@mixin outer-border($colour, $alpha: 0.7, $width: 2, $style: solid) { +@mixin border($colour, $alpha: 1, $width: 1, $style: solid) { border: s($width) $style color.change($colour, $alpha: $alpha); } diff --git a/scss/bar.scss b/scss/bar.scss index 9b4c60d..b3f5d92 100644 --- a/scss/bar.scss +++ b/scss/bar.scss @@ -5,7 +5,7 @@ .bar { @include lib.rounded(10, $tl: 0, $tr: 0); - @include lib.outer-border(scheme.$rosewater); + @include lib.border(scheme.$rosewater, 0.7, 2); @include lib.spacing(10); @include font.mono; diff --git a/scss/notifpopups.scss b/scss/notifpopups.scss index f01bf5a..aef9efe 100644 --- a/scss/notifpopups.scss +++ b/scss/notifpopups.scss @@ -4,7 +4,7 @@ @use "font"; @mixin popup($colour) { - @include lib.outer-border($colour); + @include lib.border($colour, 0.5); border-right: none; @@ -13,7 +13,7 @@ } .image { - @include lib.border(color.change($colour, $alpha: 0.05)); + @include lib.border($colour, 0.05); } } diff --git a/scss/widgets.scss b/scss/widgets.scss index 4bc52be..39ab490 100644 --- a/scss/widgets.scss +++ b/scss/widgets.scss @@ -3,6 +3,16 @@ @use "lib"; @use "font"; +* { + selection { + background-color: color.change(scheme.$overlay2, $alpha: 0.3); + } + + & { + caret-color: scheme.$rosewater; + } +} + label.icon { @include font.icon; } @@ -35,7 +45,7 @@ separator, menu { @include -appear; @include lib.rounded(5); - @include lib.border(color.change(scheme.$blue, $alpha: 0.7), 2); + @include lib.border(scheme.$blue, 0.7); @include font.main; padding: lib.s(10); @@ -88,7 +98,7 @@ menu { tooltip, .tooltip { @include lib.rounded(5); - @include lib.border(color.change(scheme.$teal, $alpha: 0.7)); + @include lib.border(scheme.$teal, 0.7); @include font.reading; background-color: scheme.$surface0; diff --git a/utils/widgets.tsx b/utils/widgets.tsx index 2078aad..7c40184 100644 --- a/utils/widgets.tsx +++ b/utils/widgets.tsx @@ -43,3 +43,6 @@ export const setupCustomTooltip = (self: any, text: string | Binding<string>) => return window; }; + +export const setupChildClickthrough = (self: any) => + self.connect("size-allocate", () => self.get_window()?.set_child_input_shapes()); |