This commit is contained in:
Vince 2024-05-13 14:48:16 +08:00
parent 0ce56c8644
commit d6059585d2
3 changed files with 90 additions and 11 deletions

3
.gitignore vendored
View File

@ -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

50
parse-sass.sh Executable file
View File

@ -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

View File

@ -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; }
}
}
}