From f7c0f6f1380ed305429ba3e27f1b55c54d1a7d63 Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Sat, 27 Apr 2024 18:57:21 +0800 Subject: [PATCH] Fixed #1054 --- .../shell-46-0/gnome-shell-Dark.scss | 2 +- .../shell-46-0/gnome-shell-Light.scss | 2 +- .../firefox/Monterey/parts/tabsbar-alt.css | 1 - src/sass/gnome-shell/_extensions-46-0.scss | 1 + src/sass/gnome-shell/common/_dash.scss | 7 +- .../extensions-46-0/_dash-to-dock.scss | 263 ++++++++++++++++++ src/sass/gnome-shell/widgets-46-0/_dash.scss | 10 +- src/sass/gtk/apps/_misc.scss | 4 + 8 files changed, 280 insertions(+), 10 deletions(-) create mode 100644 src/sass/gnome-shell/_extensions-46-0.scss create mode 100644 src/sass/gnome-shell/extensions-46-0/_dash-to-dock.scss diff --git a/src/main/gnome-shell/shell-46-0/gnome-shell-Dark.scss b/src/main/gnome-shell/shell-46-0/gnome-shell-Dark.scss index 48227f58..acfd8721 100644 --- a/src/main/gnome-shell/shell-46-0/gnome-shell-Dark.scss +++ b/src/main/gnome-shell/shell-46-0/gnome-shell-Dark.scss @@ -5,4 +5,4 @@ $variant: 'dark'; @import '../../../sass/gnome-shell/drawing'; @import '../../../sass/gnome-shell/common'; @import '../../../sass/gnome-shell/widgets-46-0'; -@import '../../../sass/gnome-shell/extensions-40-0'; +@import '../../../sass/gnome-shell/extensions-46-0'; diff --git a/src/main/gnome-shell/shell-46-0/gnome-shell-Light.scss b/src/main/gnome-shell/shell-46-0/gnome-shell-Light.scss index db71c8f3..49474c61 100644 --- a/src/main/gnome-shell/shell-46-0/gnome-shell-Light.scss +++ b/src/main/gnome-shell/shell-46-0/gnome-shell-Light.scss @@ -5,4 +5,4 @@ $variant: 'light'; @import '../../../sass/gnome-shell/drawing'; @import '../../../sass/gnome-shell/common'; @import '../../../sass/gnome-shell/widgets-46-0'; -@import '../../../sass/gnome-shell/extensions-40-0'; +@import '../../../sass/gnome-shell/extensions-46-0'; diff --git a/src/other/firefox/Monterey/parts/tabsbar-alt.css b/src/other/firefox/Monterey/parts/tabsbar-alt.css index a99c614c..f76e1efc 100644 --- a/src/other/firefox/Monterey/parts/tabsbar-alt.css +++ b/src/other/firefox/Monterey/parts/tabsbar-alt.css @@ -355,6 +355,5 @@ tab[selected]:-moz-window-inactive .tab-label { } #firefox-view-button > .toolbarbutton-icon { - filter: none !important; box-shadow: none !important; } diff --git a/src/sass/gnome-shell/_extensions-46-0.scss b/src/sass/gnome-shell/_extensions-46-0.scss new file mode 100644 index 00000000..a1aea49c --- /dev/null +++ b/src/sass/gnome-shell/_extensions-46-0.scss @@ -0,0 +1 @@ +@import 'extensions-46-0/dash-to-dock'; diff --git a/src/sass/gnome-shell/common/_dash.scss b/src/sass/gnome-shell/common/_dash.scss index 2a5a910f..621e3e02 100644 --- a/src/sass/gnome-shell/common/_dash.scss +++ b/src/sass/gnome-shell/common/_dash.scss @@ -17,10 +17,11 @@ $dash_placeholder_size: 32px; background-color: rgba(black, 0.75); border-radius: $bt_radius; padding: $base_padding $base_padding * 2; - box-shadow: none; - border: none; + margin: $base_padding; + box-shadow: none !important; + border: none !important; text-align: center; - -y-offset: $base_margin * 3; // distance from the dash edge + -y-offset: $base_margin * 2; // distance from the dash edge -x-offset: 8px; @include font(body-1); } diff --git a/src/sass/gnome-shell/extensions-46-0/_dash-to-dock.scss b/src/sass/gnome-shell/extensions-46-0/_dash-to-dock.scss new file mode 100644 index 00000000..3027b6c0 --- /dev/null +++ b/src/sass/gnome-shell/extensions-46-0/_dash-to-dock.scss @@ -0,0 +1,263 @@ +// Dash to Dock + +// Scrollview style +.bottom #dashtodockDashScrollview, +.top #dashtodockDashScrollview { + -st-hfade-offset: 24px; +} + +.left #dashtodockDashScrollview, +.right #dashtodockDashScrollview { + -st-vfade-offset: 24px; +} + +#dashtodockContainer { + background-color: transparent; + box-shadow: none; + + .number-overlay { + color: $light_fg_color; + background-color: rgba(black, 0.75); + text-align: center; + } + + .notification-badge { + color: $light_fg_color; + background-color: $primary_color; + box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.25); + border-radius: $circular_radius; + margin: 2px 3px 5px; + padding: 0.2em 0.6em; + font-weight: bold; + text-align: center; + } + + @each $_pos, $b_pos, $_shadow in (top, bottom, 0 -1px), + (bottom, top, 0 1px), + (left, right, -1px 0), + (right, left, 1px 0) { + &.#{$_pos}.straight-corner #dash, + &.#{$_pos}.shrink.straight-corner #dash, + &.#{$_pos}.extended #dash { + margin: 0 !important; + padding: 0 !important; + + .dash-background { + border-radius: 0; + border-width: 0; + border-#{$b_pos}-width: 1px; + margin: 0 !important; + box-shadow: inset #{$_shadow} rgba(white, 0.05); + } + } + } + + &.left, + &.right { + #dash { + margin-top: 0 !important; + padding: $dash_padding !important; + + #dashtodockDashContainer { + padding: $dash_padding 0 !important; + } + + .dash-background { + margin-bottom: 0 !important; + padding: $dash_padding !important; + } + + .dash-item-container .app-well-app, .show-apps { + padding: $dash_spacing $base_padding !important; + } + } + + &.extended { + #dash { + #dashtodockDashContainer { + padding: 0 !important; + + #dashtodockDashScrollview:first-child { + padding-top: 0 !important; + } + + #dashtodockDashScrollview:last-child { + padding-bottom: 0 !important; + } + + & > :first-child { + .show-apps { + padding-bottom: $container_padding !important; + } + } + + & > :last-child { + .show-apps { + padding-bottom: $dash_padding + $container_padding !important; + } + } + } + } + } + } + + &.top, + &.bottom { + &.extended { + #dash { + #dashtodockDashContainer { + padding: 0 !important; + + #dashtodockDashScrollview:first-child { + padding-left: 0 !important; + } + + #dashtodockDashScrollview:last-child { + padding-right: 0 !important; + } + + & > :first-child { + .show-apps { + padding-left: $container_padding !important; + } + } + + & > :last-child { + .show-apps { + padding-right: $dash_padding + $container_padding !important; + } + } + } + } + } + } + + #dash { // default-mode + background: none; + box-shadow: none; + + .app-grid-running-dot { + background-color: if($variant == 'light', rgba(black, 0.75), rgba(white, 0.75)); + margin-bottom: 0 !important; + margin-top: 18px !important; + } + + StWidget.focused .app-grid-running-dot { + background-color: $primary_color; + } + + .show-apps { margin: 0; } + + .show-apps, + .overview-tile { + &:hover .overview-icon, + &:focus .overview-icon { + background-color: if($variant == 'light', rgba(white, 0.25), $light_divider_color); + } + + &:active .overview-icon, + &:highlighted .overview-icon, + &:selected .overview-icon, + &:checked .overview-icon { + background-color: if($variant == 'light', rgba(white, 0.35), $light_track_color); + } + } + + .dash-background { + background-color: $dash_bg; + border: 1px solid if($variant == 'light', rgba(black, 0.08), rgba(black, 0.75)); + box-shadow: inset 0 0 0 1px rgba(white, 0.05); + } + } + + &:overview #dash { // overview-mode #1 + background: none; + + .show-apps, + .overview-tile { + &:hover .overview-icon, + &:focus .overview-icon, + &:selected .overview-icon { + background-color: $light_divider_color; + } + + &:active .overview-icon, + &:checked .overview-icon { + background-color: $light_track_color; + } + } + + .dash-background { + background-color: $light_divider_color; + border: 1px solid rgba(black, 0.08); + box-shadow: inset 0 0 0 1px rgba(white, 0.05); + } + + .app-grid-running-dot { + background-color: $light_alt_fg_color; + } + + StWidget.focused .app-grid-running-dot { + background-color: $primary_color; + } + } + + &.opaque:overview, + &.transparent:overview { // overview-mode #2 + #dash { + background-color: transparent; + box-shadow: none; + } + + .dash-background { + background-color: transparent; + } + } + + &.extended:overview, // overview-mode #3 + &.opaque.extended:overview, + &.transparent.extended:overview { + #dash { + background: none; + } + + .dash-background { + background-color: transparent !important; + border: none !important; + box-shadow: none !important; + } + } + + &.running-dots, + &.dashtodock { + .dash-item-container > StButton { + transition-duration: 250ms; + background-size: contain; + } + } + + &.extended, + &.extended:overview { + .overview-tile, + .show-apps { + .overview-icon { + border-radius: $bt_radius; + } + } + } + + .metro .overview-tile { + border-radius: 0; + } +} + +.dashtodock-app-well-preview-menu-item { + padding: 1em 1em 0.5em 1em; +} + +#dashtodockPreviewSeparator.popup-separator-menu-item-horizontal { + width: 1px; + height: auto; + border-right-width: 1px; + margin: 32px 0; +} diff --git a/src/sass/gnome-shell/widgets-46-0/_dash.scss b/src/sass/gnome-shell/widgets-46-0/_dash.scss index a04fc584..4cf5d6be 100644 --- a/src/sass/gnome-shell/widgets-46-0/_dash.scss +++ b/src/sass/gnome-shell/widgets-46-0/_dash.scss @@ -1,5 +1,5 @@ /* Dash */ -$dash_background_color: rgba(white, 0.15); +$dash_background_color: rgba(white, 0.12); $dash_placeholder_size: 32px; $dash_padding: $base_padding * 2; @@ -19,11 +19,12 @@ $dash_spacing: $base_margin * 0.5; padding-bottom: $dash_padding; padding-left: $dash_padding - $dash_spacing; // subtract the margins added to .overview-tile below padding-right: $dash_padding - $dash_spacing; + border: 1px solid rgba(black, 0.08); + box-shadow: inset 0 0 0 1px rgba(white, 0.05); } // items on the dash .dash-item-container { - .placeholder { // background-image: url("resource:///org/gnome/shell/theme/dash-placeholder.svg"); background-image: none; @@ -61,7 +62,8 @@ $dash_spacing: $base_margin * 0.5; &:focus .overview-icon { background-color: $light_divider_color; } &:hover .overview-icon { background-color: $light_divider_color; } &:active .overview-icon { background-color: $light_track_color; } - &:highlighted .overview-icon,&:selected .overview-icon, + &:highlighted .overview-icon, + &:selected .overview-icon, &:checked .overview-icon { background-color: $light_track_color; } &:insensitive .overview-icon { background-color: transparent; } } @@ -90,5 +92,5 @@ $dash_spacing: $base_margin * 0.5; // OSD Tooltip .dash-label { - -y-offset: $base_margin * 2; // distance from the dash edge + -y-offset: $base_margin; // distance from the dash edge } diff --git a/src/sass/gtk/apps/_misc.scss b/src/sass/gtk/apps/_misc.scss index 2a156180..12035057 100644 --- a/src/sass/gtk/apps/_misc.scss +++ b/src/sass/gtk/apps/_misc.scss @@ -119,6 +119,10 @@ window.background:not(.csd):not(.popup) { separator, scrolledwindow { background-color: $base_color; } + headerbar.titlebar { + padding: 0 12px; + } + scrollbar { background: none; border: none;