From d6059585d2f4f218270494f14662d845b11f75f7 Mon Sep 17 00:00:00 2001 From: Vince Date: Mon, 13 May 2024 14:48:16 +0800 Subject: [PATCH] update --- .gitignore | 3 --- parse-sass.sh | 50 ++++++++++++++++++++++++++++++++++++ src/sass/gtk/apps/_misc.scss | 48 ++++++++++++++++++++++++++++------ 3 files changed, 90 insertions(+), 11 deletions(-) create mode 100755 parse-sass.sh diff --git a/.gitignore b/.gitignore index a64bf533..f2a690c1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,3 @@ src/main/cinnamon/cinnamon*.css src/main/gnome-shell/*/*.css src/other/dash-to-dock/stylesheet.css src/other/dash-to-dock/stylesheet-dark.css -parse-sass.sh -lib-release.sh -stable-release/make-releases.sh diff --git a/parse-sass.sh b/parse-sass.sh new file mode 100755 index 00000000..b629cdb1 --- /dev/null +++ b/parse-sass.sh @@ -0,0 +1,50 @@ +#! /usr/bin/env bash + +REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +SRC_DIR="${REPO_DIR}/src" + +# Check command availability +function has_command() { + command -v $1 > /dev/null +} + +if [ ! "$(which sassc 2> /dev/null)" ]; then + echo sassc needs to be installed to generate the css. + if has_command zypper; then + sudo zypper in sassc + elif has_command apt; then + sudo apt install sassc + elif has_command dnf; then + sudo dnf install -y sassc + elif has_command yum; then + sudo yum install sassc + elif has_command pacman; then + sudo pacman -S --noconfirm sassc + fi +fi + +SASSC_OPT="-M -t expanded" + +_COLOR_VARIANTS=('-Light' '-Dark') +if [ ! -z "${COLOR_VARIANTS:-}" ]; then + IFS=', ' read -r -a _COLOR_VARIANTS <<< "${COLOR_VARIANTS:-}" +fi + +for color in "${_COLOR_VARIANTS[@]}"; do + sassc $SASSC_OPT src/main/gtk-3.0/gtk${color}.{scss,css} + echo "==> Generating the 3.0 gtk${color}.css..." + sassc $SASSC_OPT src/main/gtk-4.0/gtk${color}.{scss,css} + echo "==> Generating the 4.0 gtk${color}.css..." + sassc $SASSC_OPT src/main/gnome-shell/shell-3-28/gnome-shell${color}.{scss,css} + echo "==> Generating the 3.28 gnome-shell${color}.css..." + sassc $SASSC_OPT src/main/gnome-shell/shell-40-0/gnome-shell${color}.{scss,css} + echo "==> Generating the 40.0 gnome-shell${color}.css..." + sassc $SASSC_OPT src/main/gnome-shell/shell-42-0/gnome-shell${color}.{scss,css} + echo "==> Generating the 42.0 gnome-shell${color}.css..." + sassc $SASSC_OPT src/main/gnome-shell/shell-44-0/gnome-shell${color}.{scss,css} + echo "==> Generating the 44.0 gnome-shell${color}.css..." + sassc $SASSC_OPT src/main/gnome-shell/shell-46-0/gnome-shell${color}.{scss,css} + echo "==> Generating the 46.0 gnome-shell${color}.css..." + sassc $SASSC_OPT src/main/cinnamon/cinnamon${color}.{scss,css} + echo "==> Generating the cinnamon${color}.css..." +done diff --git a/src/sass/gtk/apps/_misc.scss b/src/sass/gtk/apps/_misc.scss index 12035057..60bc5b01 100644 --- a/src/sass/gtk/apps/_misc.scss +++ b/src/sass/gtk/apps/_misc.scss @@ -264,7 +264,7 @@ window.background.chromium { // // Libre-Office // -window.background:not(.solid-csd) { +window.background:not(.solid-csd):not(.csd) { // reserved area at the most-right side of GtkMenuBar > grid.horizontal > grid.horizontal { background-color: $header_bg; @@ -278,7 +278,7 @@ window.background:not(.solid-csd) { background-image: none; &:hover { - background-color: lighten($header_bg, 15%); + background-color: rgba($header_fg, 0.15); color: lighten($header_fg, 5%); } @@ -293,9 +293,27 @@ window.background:not(.solid-csd) { } } } -} -window.background:not(.solid-csd) { + > grid.horizontal > widget > widget { + viewport.frame > box > box > box > grid toolbar { + background: none; + border: none; + padding: 3px; + } + + > scrolledwindow > viewport.frame > grid > box.vertical { + > toolbar { + background: none; + border: none; + padding: 6px; + } + } + + toolbar.small-button { + border: none; + } + } + // for 'Notebookbar' toolbar > notebook { border: none; // unset borders @@ -310,10 +328,24 @@ window.background:not(.solid-csd) { } #combobox.linked { - > button.combo { - &, &:checked { - border-radius: 0 $bt_radius $bt_radius 0; - border-right: 1px solid $borders_color; + > entry.combo { + border: 1px solid $dark_borders_color; + border-right: none; + + &:focus { + border-color: $entry_highlight; + @if $variant == 'dark' { box-shadow: inset 0 0 0 1px $entry_highlight; } + @if $variant == 'light' { box-shadow: 0 1px 1px 0 transparent, inset 0 0 0 1px $entry_highlight; } + + + button.combo { + border-left-color: $entry_highlight; + } + } + + &:drop(active) { + border-color: $drop_target_color; + @if $variant == 'dark' { box-shadow: inset 0 0 0 1px $drop_target_color; } + @if $variant == 'light' { box-shadow: 0 1px 1px 0 transparent, inset 0 0 0 1px $drop_target_color; } } } }