Skip to content

Commit

Permalink
Fixed gnome 47 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceliuice committed Oct 4, 2024
1 parent 20e8dfe commit c44dd8d
Show file tree
Hide file tree
Showing 53 changed files with 30,342 additions and 176 deletions.
6 changes: 4 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ SIZE_VARIANTS=('' '-compact')
if [[ "$(command -v gnome-shell)" ]]; then
gnome-shell --version
SHELL_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -1)"
if [[ "${SHELL_VERSION:-}" -ge "46" ]]; then
if [[ "${SHELL_VERSION:-}" -ge "47" ]]; then
GS_VERSION="47-0"
elif [[ "${SHELL_VERSION:-}" -ge "46" ]]; then
GS_VERSION="46-0"
elif [[ "${SHELL_VERSION:-}" -ge "44" ]]; then
GS_VERSION="44-0"
Expand All @@ -51,7 +53,7 @@ if [[ "$(command -v gnome-shell)" ]]; then
fi
else
echo "'gnome-shell' not found, using styles for last gnome-shell version available."
GS_VERSION="46-0"
GS_VERSION="47-0"
fi

usage() {
Expand Down
1 change: 1 addition & 0 deletions parse-sass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ for color in "${_COLOR_VARIANTS[@]}"; do
sassc "${SASSC_OPT[@]}" "src/gnome-shell/shell-42-0/gnome-shell$color$size."{scss,css}
sassc "${SASSC_OPT[@]}" "src/gnome-shell/shell-44-0/gnome-shell$color$size."{scss,css}
sassc "${SASSC_OPT[@]}" "src/gnome-shell/shell-46-0/gnome-shell$color$size."{scss,css}
sassc "${SASSC_OPT[@]}" "src/gnome-shell/shell-47-0/gnome-shell$color$size."{scss,css}
sassc "${SASSC_OPT[@]}" "src/cinnamon/cinnamon$color$size."{scss,css}
done
done
Expand Down
4 changes: 3 additions & 1 deletion src/gnome-shell/sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ $panel_disabled_fg_color: if($panel == 'light', rgba($black, 0.35),
$panel_disabled_secondary_fg_color: if($panel == 'light', rgba($black, 0.26), rgba($white, 0.30));
$panel_track_color: if($panel == 'light', rgba($white, 0.50), rgba($white, 0.15));
$panel_divider_color: if($panel == 'light', rgba($white, 0.35), rgba($white, 0.10));
$panel_fill_color: if($panel == 'light', rgba($white, 0.02), rgba($white, 0.06));

$inverse_fg_color: rgba($white, 0.85);
$inverse_secondary_fg_color: rgba($white, 0.7);
Expand All @@ -61,6 +62,7 @@ $inverse_disabled_fg_color: rgba($white, 0.5);
$inverse_disabled_secondary_fg_color: rgba($white, 0.3);
$inverse_track_color: rgba($white, 0.3);
$inverse_divider_color: rgba($white, 0.15);
$inverse_fill_color: rgba($white, 0.08);

// Background colors
$base_color: if($variant =='dark', #202020, #ffffff);
Expand All @@ -69,7 +71,7 @@ $alt_base_color: if($variant =='dark', lighten($base_color,
$dark_bg_color: rgba(#202020, 0.9);
$alt_dark_bg_color: rgba(#202020, 0.75);
$inverse_bg_color: rgba($inverse_fg_color, 0.13);
$button_bg_color: if($variant == 'light', rgba(white, 1), rgba(white, 0.1));
$button_bg_color: if($variant == 'light', $base_color, lighten($base_color, 8%));
$keyboard_bg_color: if($variant == 'light', $grey-50, fade($grey-600)); // for gnome-shell keyboard
$alt_keyboard_bg_color: if($variant == 'light', darken($grey-300, 10%), fade($grey-800)); // for gnome-shell keyboard

Expand Down
18 changes: 14 additions & 4 deletions src/gnome-shell/sass/_drawing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,11 @@

@if $t == focus {
color: $primary_color;
box-shadow: none;
&:active {
color: white;
box-shadow: none !important;
outline: none !important;

&:hover, &:active {
color: $primary_color;
}
}

Expand All @@ -215,16 +217,24 @@

@if $t == active {
color: $tc;
background-color: darken($c, 5%);
background-color: if($variant == 'light', darken($c, 5%), lighten($c, 5%));
border-color: if($variant == 'light', darken($c, 20%), rgba(white, 0.15));
box-shadow: none;

&:hover, &:focus {
background-color: if($variant == 'light', darken($c, 5%), lighten($c, 5%));
}
}

@if $t == checked {
color: $inverse_fg_color;
background-color: $primary_color;
border-color: $primary_color;
box-shadow: none;

&:hover, &:focus {
background-color: $primary_color;
}
}

@if $t == insensitive {
Expand Down
53 changes: 53 additions & 0 deletions src/gnome-shell/sass/_widgets-47-0.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
//
// Shell widgets stylesheets are placed in separate .scss files
// in 'widgets' and imported into the main stylesheet in this file.
// To create or update a widget for the shell modify the list below.
//

/* WIDGETS */

// Primary widgets
@import 'widgets/base';
@import 'widgets/entries';
@import 'widgets/buttons';
@import 'widgets/check-box';
@import 'widgets/switches-47';
@import 'widgets/slider-47';
@import 'widgets/scrollbars';
// Popovers
@import 'widgets/popovers-42';
@import 'widgets/calendar-46';
@import 'widgets/message-list-46';
@import 'widgets/ibus-popup';
// Notifications
@import 'widgets/notifications-47';
@import 'widgets/hotplug';
// Dialogs
@import 'widgets/dialogs-47';
@import 'widgets/network-dialog';
// OSDs
@import 'widgets/osd-42';
@import 'widgets/switcher-popup';
@import 'widgets/workspace-switcher';
// Panel
@import 'widgets/panel';
@import 'widgets/corner-ripple';
// Overview
@import 'widgets/overview';
@import 'widgets/window-picker';
@import 'widgets/search-entry';
@import 'widgets/search-results-46';
@import 'widgets/dash-46';
@import 'widgets/app-grid-46';
@import 'widgets/workspace-thumbnails';
// A11y / misc
@import 'widgets/a11y';
@import 'widgets/misc';
@import 'widgets/tiled-previews';
@import 'widgets/keyboard';
@import 'widgets/looking-glass';
@import 'widgets/quick-settings-44';
@import 'widgets/screenshot';
// Lock / login screens
@import 'widgets/login-dialog';
@import 'widgets/screen-shield';
3 changes: 2 additions & 1 deletion src/gnome-shell/sass/widgets/_app-grid-46.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ StWidget.focused {
}

& .icon-button {
background-color: $inverse_divider_color;
background-color: $inverse_fill_color;
color: $inverse_secondary_fg_color;
border: none;

Expand All @@ -174,6 +174,7 @@ StWidget.focused {
& > StIcon { icon-size: 16px }

&:hover { background-color: $inverse_divider_color; }
&:focus { border: none !important; box-shadow: none !important; outline: none !important; }
&:checked, &:active { background-color: $inverse_track_color; }
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/gnome-shell/sass/widgets/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@
&:insensitive { @include button(flat-insensitive); }
}

%dialog_button {
border-radius: $buttons_radius;
border: 1px solid;

@include button(normal);
&:focus { @include button(focus); }
&:hover { @include button(hover); }
&:selected, &:active { @include button(active); }
&:checked { @include button(checked); }
&:insensitive { @include button(insensitive); }
}

.button {
@extend %button;
min-height: to_em(22px);
Expand Down
Loading

0 comments on commit c44dd8d

Please sign in to comment.