Support GNOME 45 and Libadwaita updates 👽

Fixes #187
Fixes #190
This commit is contained in:
Daniel Thwaites 2023-11-25 14:36:45 +00:00
parent a15c3196c1
commit 8b3f61727f
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D
5 changed files with 75 additions and 51 deletions

View file

@ -169,11 +169,11 @@
]
},
"locked": {
"lastModified": 1691882297,
"narHash": "sha256-e1/LAQSGLnBywfA1TfMl0Vj3tvYka73XOZ/D2/CJowE=",
"lastModified": 1700847865,
"narHash": "sha256-uWaOIemGl9LF813MW0AEgCBpKwFo2t1Wv3BZc6e5Frw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c3ab5ea047e6dc73df530948f7367455749d8906",
"rev": "8cedd63eede4c22deb192f1721dd67e7460e1ebe",
"type": "github"
},
"original": {
@ -184,11 +184,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1691853136,
"narHash": "sha256-wTzDsRV4HN8A2Sl0SVQY0q8ILs90CD43Ha//7gNZE+E=",
"lastModified": 1700856099,
"narHash": "sha256-RnEA7iJ36Ay9jI0WwP+/y4zjEhmeN6Cjs9VOFBH7eVQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f0451844bbdf545f696f029d1448de4906c7f753",
"rev": "0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1",
"type": "github"
},
"original": {

View file

@ -1,45 +1,47 @@
diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml
index 24b3be8db..3ec37da33 100644
index 8a4948e41..955ed5b13 100644
--- a/data/gnome-shell-theme.gresource.xml
+++ b/data/gnome-shell-theme.gresource.xml
@@ -10,7 +10,6 @@
<file>checkbox-off-light.svg</file>
@@ -11,7 +11,6 @@
<file>checkbox-off.svg</file>
<file>gnome-shell.css</file>
<file>gnome-shell-dark.css</file>
<file>gnome-shell-light.css</file>
- <file>gnome-shell-high-contrast.css</file>
<file>gnome-shell-start.svg</file>
<file>pad-osd.css</file>
<file>process-working.svg</file>
diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss
index 953bee598..36ce19a4d 100644
index 5b117ea71..67e7ce756 100644
--- a/data/theme/gnome-shell-sass/_common.scss
+++ b/data/theme/gnome-shell-sass/_common.scss
@@ -166,8 +166,8 @@ stage {
@@ -168,9 +168,9 @@ stage {
// tooltip
%tooltip {
- background-color: transparentize(black, 0.1);
- border: 1px solid transparentize($light_1, 0.9);
- color: $light_1;
+ background-color: transparentize($bg_color, 0.1);
+ border: 1px solid transparentize($base_color, 0.9);
+ color: $fg_color;
border-radius: 99px;
padding: $base_padding $base_padding * 2;
diff --git a/data/theme/gnome-shell-sass/_drawing.scss b/data/theme/gnome-shell-sass/_drawing.scss
index a69d38175..e79dc0c28 100644
index 404c4dc81..f006b9347 100644
--- a/data/theme/gnome-shell-sass/_drawing.scss
+++ b/data/theme/gnome-shell-sass/_drawing.scss
@@ -143,7 +143,7 @@
//
// since buttons are all flat an borderless now the mixin is simpler
-@mixin button($t, $tc:$fg_color, $c:$bg_color, $flat: false) {
+@mixin button($t, $tc:$fg_color, $c:$base_color, $flat: false) {
-@mixin button($t, $tc:$fg_color, $c:$bg_color, $flat: false, $osd: false) {
+@mixin button($t, $tc:$fg_color, $c:$base_color, $flat: false, $osd: false) {
$button_bg_color: mix($tc, $c, $button_mix_factor);
transition-duration: 100ms;
diff --git a/data/theme/gnome-shell-sass/widgets/_calendar.scss b/data/theme/gnome-shell-sass/widgets/_calendar.scss
index 393221627..0bc93111a 100644
index fc054da38..8e31741c1 100644
--- a/data/theme/gnome-shell-sass/widgets/_calendar.scss
+++ b/data/theme/gnome-shell-sass/widgets/_calendar.scss
@@ -27,6 +27,8 @@
@ -51,7 +53,7 @@ index 393221627..0bc93111a 100644
}
/* Calendar */
@@ -250,7 +252,7 @@
@@ -220,7 +222,7 @@
.weather-forecast-time {
@extend %numeric;
@extend %caption;
@ -61,13 +63,16 @@ index 393221627..0bc93111a 100644
padding-bottom: 0.4em;
}
diff --git a/data/theme/gnome-shell-sass/widgets/_panel.scss b/data/theme/gnome-shell-sass/widgets/_panel.scss
index 650d4fa83..63ac5df8f 100644
index 6e7b3be14..3f37fdef5 100644
--- a/data/theme/gnome-shell-sass/widgets/_panel.scss
+++ b/data/theme/gnome-shell-sass/widgets/_panel.scss
@@ -1,9 +1,9 @@
@@ -1,11 +1,11 @@
/* Top Bar */
// a.k.a. the panel
-$privacy_indicator_color: $orange_3;
+$privacy_indicator_color: $warning_color;
-$panel_bg_color: if($variant == 'light', $light_3, $dark_5);
-$panel_fg_color: if($variant == 'light', $fg_color, darken($fg_color, 5%));
-$panel_border_color: if($variant == 'light', darken($panel_bg_color, 2%), $panel_bg_color);
@ -78,15 +83,13 @@ index 650d4fa83..63ac5df8f 100644
$panel_system_fg_color: $system_fg_color; // always light for lockscreen, overview and other transparent panels
$panel_height: 2.2em;
diff --git a/data/theme/gnome-shell-sass/widgets/_quick-settings.scss b/data/theme/gnome-shell-sass/widgets/_quick-settings.scss
index 82a5e11aa..681d73e33 100644
index 723afe7db..b23062294 100644
--- a/data/theme/gnome-shell-sass/widgets/_quick-settings.scss
+++ b/data/theme/gnome-shell-sass/widgets/_quick-settings.scss
@@ -108,15 +108,10 @@
padding-bottom: 2 * $base_padding;
@@ -110,13 +110,9 @@
& .icon {
- icon-size: $base_icon_size*1.5; // a non-standard symbolic size but ok
- border-radius: 999px;
icon-size: $base_icon_size*1.5; // a non-standard symbolic size but ok
border-radius: 999px;
- padding: 1.5 * $base_padding;
- background-color: transparentize($fg_color, 0.8);
-
@ -94,7 +97,6 @@ index 82a5e11aa..681d73e33 100644
- background-color: $selected_bg_color;
- color: $selected_fg_color;
- }
+ icon-size: $base_icon_size * 1.5;
+ padding: $base_padding;
+ background-color: $bg_color;
+ color: $fg_color;

View file

@ -1,28 +1,36 @@
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 94dffda73..8decf5629 100644
index 9f4313b54..9deebbcf9 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -361,7 +361,6 @@ class QuickSettings extends PanelMenu.Button {
this._location = new imports.ui.status.location.Indicator();
this._thunderbolt = new imports.ui.status.thunderbolt.Indicator();
this._nightLight = new imports.ui.status.nightLight.Indicator();
- this._darkMode = new imports.ui.status.darkMode.Indicator();
this._powerProfiles = new imports.ui.status.powerProfiles.Indicator();
this._rfkill = new imports.ui.status.rfkill.Indicator();
this._autoRotate = new imports.ui.status.autoRotate.Indicator();
@@ -374,7 +373,6 @@ class QuickSettings extends PanelMenu.Button {
@@ -30,7 +30,6 @@ import * as BrightnessStatus from './status/brightness.js';
import * as SystemStatus from './status/system.js';
import * as LocationStatus from './status/location.js';
import * as NightLightStatus from './status/nightLight.js';
-import * as DarkModeStatus from './status/darkMode.js';
import * as BacklightStatus from './status/backlight.js';
import * as ThunderboltStatus from './status/thunderbolt.js';
import * as AutoRotateStatus from './status/autoRotate.js';
@@ -546,7 +545,6 @@ class QuickSettings extends PanelMenu.Button {
this._location = new LocationStatus.Indicator();
this._thunderbolt = new ThunderboltStatus.Indicator();
this._nightLight = new NightLightStatus.Indicator();
- this._darkMode = new DarkModeStatus.Indicator();
this._backlight = new BacklightStatus.Indicator();
this._powerProfiles = new PowerProfileStatus.Indicator();
this._rfkill = new RFKillStatus.Indicator();
@@ -567,7 +565,6 @@ class QuickSettings extends PanelMenu.Button {
this._indicators.add_child(this._nightLight);
if (this._network)
this._indicators.add_child(this._network);
- this._indicators.add_child(this._darkMode);
this._indicators.add_child(this._backlight);
this._indicators.add_child(this._powerProfiles);
if (this._bluetooth)
this._indicators.add_child(this._bluetooth);
@@ -397,7 +395,6 @@ class QuickSettings extends PanelMenu.Button {
this._addItems(this._bluetooth.quickSettingsItems);
this._addItems(this._powerProfiles.quickSettingsItems);
this._addItems(this._nightLight.quickSettingsItems);
- this._addItems(this._darkMode.quickSettingsItems);
this._addItems(this._rfkill.quickSettingsItems);
this._addItems(this._autoRotate.quickSettingsItems);
this._addItems(this._unsafeMode.quickSettingsItems);
@@ -599,7 +596,6 @@ class QuickSettings extends PanelMenu.Button {
this._addItemsBefore(this._bluetooth.quickSettingsItems, sibling);
this._addItemsBefore(this._powerProfiles.quickSettingsItems, sibling);
this._addItemsBefore(this._nightLight.quickSettingsItems, sibling);
- this._addItemsBefore(this._darkMode.quickSettingsItems, sibling);
this._addItemsBefore(this._backlight.quickSettingsItems, sibling);
this._addItemsBefore(this._rfkill.quickSettingsItems, sibling);
this._addItemsBefore(this._autoRotate.quickSettingsItems, sibling);

View file

@ -7,14 +7,14 @@ let
};
in pkgs.stdenv.mkDerivation {
name = "stylix-gnome-shell-theme";
name = "${config.lib.stylix.colors.slug}-gnome-shell-theme";
src = pkgs.fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "gnome-shell";
rev = "44.1";
sha256 = "h9TBLGakXffEvuP+0dVHmG7+TV5J6CdM/3KHFNUuc70=";
rev = "45.1";
sha256 = "/TIkZ8y5Wv3QHLFp79Poao9fINurKs5pa4z0CRe+F8s=";
};
patches = [ ./shell_colors.patch ];
@ -25,13 +25,17 @@ in pkgs.stdenv.mkDerivation {
nativeBuildInputs = with pkgs; [ sass glib.dev ];
buildPhase = ''
sass data/theme/gnome-shell.scss >data/theme/gnome-shell.css
glib-compile-resources --sourcedir=data/theme data/gnome-shell-theme.gresource.xml
sass data/theme/gnome-shell-light.scss \
>data/theme/gnome-shell-light.css
cp data/theme/gnome-shell-{light,dark}.css
glib-compile-resources \
--sourcedir=data/theme \
data/gnome-shell-theme.gresource.xml
'';
installPhase = ''
mkdir -p $out/share/gnome-shell
mv data/theme/gnome-shell.css $out/share/gnome-shell/gnome-shell.css
mv data/theme/gnome-shell-light.css $out/share/gnome-shell/gnome-shell.css
mv data/gnome-shell-theme.gresource $out/share/gnome-shell/gnome-shell-theme.gresource
'';
}

View file

@ -22,6 +22,15 @@
@define-color headerbar_border_color rgba({{base01-dec-r}}, {{base01-dec-g}}, {{base01-dec-b}}, 0.7);
@define-color headerbar_backdrop_color @window_bg_color;
@define-color headerbar_shade_color rgba(0, 0, 0, 0.07);
@define-color headerbar_darker_shade_color rgba(0, 0, 0, 0.07);
@define-color sidebar_bg_color #{{base01-hex}};
@define-color sidebar_fg_color #{{base05-hex}};
@define-color sidebar_backdrop_color @window_bg_color;
@define-color sidebar_shade_color rgba(0, 0, 0, 0.07);
@define-color secondary_sidebar_bg_color @sidebar_bg_color;
@define-color secondary_sidebar_fg_color @sidebar_fg_color;
@define-color secondary_sidebar_backdrop_color @sidebar_backdrop_color;
@define-color secondary_sidebar_shade_color @sidebar_shade_color;
@define-color card_bg_color #{{base01-hex}};
@define-color card_fg_color #{{base05-hex}};
@define-color card_shade_color rgba(0, 0, 0, 0.07);
@ -29,6 +38,7 @@
@define-color dialog_fg_color #{{base05-hex}};
@define-color popover_bg_color #{{base01-hex}};
@define-color popover_fg_color #{{base05-hex}};
@define-color popover_shade_color rgba(0, 0, 0, 0.07);
@define-color shade_color rgba(0, 0, 0, 0.07);
@define-color scrollbar_outline_color #{{base02-hex}};
@define-color blue_1 #{{base0D-hex}};