From f9e8e68108fff63d4aec25289066bc0777de6ef0 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Tue, 24 Oct 2023 23:14:52 +0800 Subject: [PATCH] Fixed Gnome 45 Virtual Desktop Indicator #962 --- install.sh | 3 + shell/lib-install.sh | 6 ++ src/sass/_theme-options.scss | 3 + src/sass/gnome-shell/common/_panel.scss | 91 ++++++++++++++++--------- src/sass/gtk/apps/_unity.scss | 2 +- 5 files changed, 72 insertions(+), 33 deletions(-) diff --git a/install.sh b/install.sh index 4060ed62..63782abe 100755 --- a/install.sh +++ b/install.sh @@ -39,6 +39,7 @@ usage() { helpify "-l, --libadwaita" "" "Install theme into gtk4.0 config for libadwaita" "Default is dark version" helpify "-HD, --highdefinition" "" "Set to High Definition size" "Default is laptop size" helpify "--normal, --normalshowapps" "" "Set gnome-shell show apps button style to normal" "Default is BigSur" + helpify "--default, --defaultactivities" "" "Set gnome-shell panel activities button style to system default" "Default is Apple icon" helpify "--round, --roundedmaxwindow" "" "Set maximized window to rounded" "Default is square" helpify "--right, --rightplacement" "" "Set Nautilus title button placement to right" "Default is left" helpify "--black, --blackfont" "" "Set panel font color to black" "Default is white" @@ -78,6 +79,8 @@ while [[ $# -gt 0 ]]; do interactive='true'; shift ;; --normal|--normalshowapps) showapps_normal="true"; shift ;; + --default|--defaultactivities) + default_activities="true"; shift ;; --right|--rightplacement) right_placement="true"; shift ;; --round|--roundedmaxwindow) diff --git a/shell/lib-install.sh b/shell/lib-install.sh index fc625d24..16a3c4bf 100755 --- a/shell/lib-install.sh +++ b/shell/lib-install.sh @@ -957,6 +957,12 @@ customize_theme() { sed $SED_OPT "/\$showapps_button/s/bigsur/normal/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss" fi + # Change gnome-shell panel activities button style + if [[ "${default_activities}" == 'true' ]]; then + prompt -s "Changing gnome-shell panel activities button style ...\n" + sed $SED_OPT "/\$activities/s/apple/normal/" "${THEME_SRC_DIR}/sass/_theme-options-temp.scss" + fi + # Change panel font color if [[ "${monterey}" == 'true' ]]; then black_font="true" diff --git a/src/sass/_theme-options.scss b/src/sass/_theme-options.scss index 7f91c4ef..0db10c17 100644 --- a/src/sass/_theme-options.scss +++ b/src/sass/_theme-options.scss @@ -29,6 +29,9 @@ $panel_font: 'white'; // Panel height size $panel_size: 'default'; +// Panel Activities button style +$activities: 'apple'; + // Monterey style $monterey: 'false'; diff --git a/src/sass/gnome-shell/common/_panel.scss b/src/sass/gnome-shell/common/_panel.scss index 26f38e13..37741adf 100644 --- a/src/sass/gnome-shell/common/_panel.scss +++ b/src/sass/gnome-shell/common/_panel.scss @@ -47,6 +47,61 @@ $panel_height: $menuitem_size; } } +%normal_activites { + -natural-hpadding: $base_padding * 3; + color: $panel_fg; + + StBoxLayout { + spacing: $container_padding; + } + + .workspace-dot { + background-color: $panel_fg; + } + + &:overview { + .workspace-dot { + background-color: $light_fg_color; + } + } +} + +%apple_activites { + -natural-hpadding: $base_padding * 2; + background-image: url("assets/activities.svg"); + background-position: center center; + background-size: 24px 24px; + width: 24px; + height: 24px; + color: transparent; + font-size: 0; + + > * { width: $medium_size; } + + StBoxLayout { + spacing: 0; + } + + .workspace-dot { + background-color: transparent; + } + + &:active, &:overview, &:focus, &:checked { + border: none; + color: transparent; + } + + &:overview { background-color: transparent; } + + @if $variant == 'light' { + @if $panel_font == 'black' or $trans == 'false' { + &:overview { + background-image: url("assets/activities-white.svg"); + } + } + } +} + #panel { background-color: $panel_bg; font-weight: 500; @@ -196,41 +251,13 @@ $panel_height: $menuitem_size; } &#panelActivities { // Activities button - -natural-hpadding: $base_padding * 2; - background-image: url("assets/activities.svg"); - background-position: center center; - background-size: 24px 24px; - width: 24px; - height: 24px; background-gradient-direction: none; border: none; - color: transparent; - font-size: 0; - > * { width: $medium_size; } - - StBoxLayout { - spacing: 0; - } - - .workspace-dot { - background-color: transparent; - } - - &:active, &:overview, &:focus, &:checked { - border: none; - color: transparent; - // background-image: url("assets/activities-active.svg"); - } - - &:overview { background-color: transparent; } - - @if $variant == 'light' { - @if $panel_font == 'black' or $trans == 'false' { - &:overview { - background-image: url("assets/activities-white.svg"); - } - } + @if $activities == 'apple' { + @extend %apple_activites; + } @else { + @extend %normal_activites; } } } diff --git a/src/sass/gtk/apps/_unity.scss b/src/sass/gtk/apps/_unity.scss index 8e9fa6bc..d65eb1ec 100644 --- a/src/sass/gtk/apps/_unity.scss +++ b/src/sass/gtk/apps/_unity.scss @@ -74,7 +74,7 @@ UnityPanelWidget, background-color: lighten($header_bg, 8); border-radius: 0px; padding: 0px; - color: white; + color: $header_fg; } .lightdm.menu .menuitem *,