Skip to content

Commit a2c53cd

Browse files
committed
gnome-shell: Simplify colors code by just overriding what we need
So we can reduce even more delta
1 parent ee18948 commit a2c53cd

File tree

4 files changed

+18
-55
lines changed

4 files changed

+18
-55
lines changed

gnome-shell/src/gnome-shell-sass/_colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// When color definition differs for dark and light variant, it gets @if-ed depending on $variant
55

66
@import '_palette.scss';
7-
//@import '_default-colors.scss';
7+
@import '_default-colors.scss';
88
@import '_yaru-default-colors.scss';
99

1010
// global colors

gnome-shell/src/gnome-shell-sass/_palette.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,19 @@ $green: #0e8420;
3434
$blue: #19B6EE;
3535
$linkblue: #007aa6;
3636
$darkblue: #335280;
37+
38+
// Redefine some GNOME colors we are ok with
39+
$light_1: white;
40+
$light_2: $porcelain;
41+
42+
$dark_4: lighten($jet, 4%);
43+
$dark_5: black;
44+
45+
$red_3: $red;
46+
$red_4: darken($red, 10%);
47+
48+
$green_4: lighten($green, 5%);
49+
$green_5: darken($green, 5%);
50+
51+
$yellow_4: darken($yellow, 1%);
52+
$yellow_3: $yellow;
Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,6 @@
1-
// Named Colors
2-
3-
// Redefine some GNOME colors we are ok with
4-
$light_1: white !default;
5-
$dark_5: black !default;
6-
7-
// base colors
1+
// override base colors
82
$_base_color_dark: lighten($jet, 4%); // Yaru: use our colors
93
$_base_color_light: $light_1; // Yaru: use our colors
104

11-
// colors for destructive elements
12-
$destructive_bg_color: if($variant=='light', $red, darken($red, 10%)); // Yaru: use our colors
13-
$destructive_fg_color: $light_1;
14-
$destructive_color: $destructive_bg_color;
15-
16-
// colors for levelbars, entries, labels and infobars
17-
$success_bg_color: if($variant == 'light', lighten($green, 5%), darken($green, 5%)); // Yaru: use our colors
18-
$success_fg_color: $light_1;
19-
$success_color: $success_bg_color;
20-
21-
$warning_bg_color: if($variant == 'light', darken($yellow, 1%), $yellow); // Yaru: use our colors
22-
$warning_fg_color: transparentize(black, .2);
23-
$warning_color: $warning_bg_color;
24-
25-
$error_bg_color: $red; // Yaru: use our colors
26-
$error_fg_color: $light_1;
27-
$error_color: $error_bg_color;
28-
29-
// link colors
30-
$link_color: if($variant =='light', st-darken(-st-accent-color, 10%), st-lighten(-st-accent-color, 20%));
31-
$link_visited_color: st-transparentize($link_color, .6);
32-
33-
// special cased widget definitions
34-
$background_mix_factor: if($variant == 'light', 12%, 9%); // used to boost the color of backgrounds in different variants
35-
$border_opacity: if($variant == 'light', .85, .9); // change the border opacity in different variants
36-
37-
// shadows
38-
$shadow_color: if($variant == 'light', rgba(0,0,0,.05), rgba(0,0,0,0.2));
39-
$text_shadow_color: if($variant == 'light', rgba(255,255,255,0.3), rgba(0,0,0,0.2));
40-
41-
// focus colors
42-
$focus_color: -st-accent-color;
43-
$focus_border_color: st-transparentize($focus_color, 0.5);
44-
455
// Used for dash and other dark elements on light theme
466
$yaru_borders_color_dark: lighten(desaturate(lighten($jet, 4%), 100%), 14%);
47-
48-
// High Contrast overrides
49-
@if $contrast == 'high' {
50-
// increase border opacity
51-
$border_opacity: .5;
52-
// remove shadows
53-
$shadow_color: transparent;
54-
$text_shadow_color: transparent;
55-
// less transparent focus color
56-
$focus_border_color: st-transparentize($focus_color, 0.2);
57-
}

sessions/meson.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ gnomeshell_mode_dir = join_paths(get_option('datadir'), 'gnome-shell', 'modes')
33
conf_data = configuration_data()
44
conf_data.set('ThemeName', meson.project_name())
55
conf_data.set('LowerCaseThemeName', meson.project_name().to_lower())
6-
conf_data.set('DefaultVariant',
7-
get_option('gnome-shell-default-variant').endswith('dark') ? 'dark' : 'light')
86

97
resource_path = gnomeshell_use_gresource ? join_paths('theme', meson.project_name(), '') : ''
108
conf_data.set('ThemeResourcePath', resource_path)

0 commit comments

Comments
 (0)