From 9a69d8b3c370a240b7d76daf7c25ffdc8d039603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 22 May 2023 11:15:03 -0300 Subject: [PATCH] theme: fix warnings for negative border-radius --- overlays/default.nix | 3 ++ patches/orchis-fix-warnings.patch | 48 +++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 patches/orchis-fix-warnings.patch diff --git a/overlays/default.nix b/overlays/default.nix index 9ebcb61..65e385a 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -37,6 +37,9 @@ orchis_theme_compact = (final.orchis-theme.override { border-radius = 0; tweaks = [ "compact" "solid" ]; + }).overrideAttrs (old: { + patches = (old.patches or [ ]) ++ + [ ../patches/orchis-fix-warnings.patch ]; }); nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; }); }); diff --git a/patches/orchis-fix-warnings.patch b/patches/orchis-fix-warnings.patch new file mode 100644 index 0000000..789b9a7 --- /dev/null +++ b/patches/orchis-fix-warnings.patch @@ -0,0 +1,48 @@ +diff --git a/src/_sass/_variables.scss b/src/_sass/_variables.scss +index e8e808e..68ca7ff 100644 +--- a/src/_sass/_variables.scss ++++ b/src/_sass/_variables.scss +@@ -21,7 +21,7 @@ $menuitem-size: if($compact == 'false', 28px, 24px); + // + + $window-radius: $default_corner + $space-size; +-$corner-radius: if($compact == 'false', $default_corner, $default_corner - 2px); ++$corner-radius: if($compact == 'false', $default_corner, max(0, $default_corner - 2px)); + $menu-radius: $default_corner / 4 + $space-size + 2px; + $menuitem-radius: $default_corner / 4 + 2px; + $circular-radius: 9999px; +diff --git a/src/_sass/gtk/apps/_budgie.scss b/src/_sass/gtk/apps/_budgie.scss +index ff60df1..5bfd813 100644 +--- a/src/_sass/gtk/apps/_budgie.scss ++++ b/src/_sass/gtk/apps/_budgie.scss +@@ -53,11 +53,11 @@ + + button { + @extend %button-flat-simple; +- border-radius: $corner-radius - $space-size; ++ border-radius: max(0, $corner-radius - $space-size); + } + } + +- calendar:not(.header) { border-radius: $corner-radius - $space-size; } ++ calendar:not(.header) { border-radius: max(0, $corner-radius - $space-size); } + + scrolledwindow.sidebar.categories { // AppMenu + background-color: $fill; +@@ -108,14 +108,14 @@ + } + } + +- button { border-radius: $corner-radius - $space-size; } ++ button { border-radius: max(0, $corner-radius - $space-size); } + + button.flat:not(.image-button) { + min-height: $menuitem-size; + padding: 0 8px; + color: $text; + font-weight: normal; +- border-radius: $corner-radius - $space-size; ++ border-radius: max(0, $corner-radius - $space-size); + + &:disabled { color: $text-disabled; } + }