Fixed issues

This commit is contained in:
vinceliuice
2022-08-03 01:54:49 +08:00
parent e19dd39c92
commit eb2f59f89b
10 changed files with 208 additions and 159 deletions

View File

@@ -1,55 +0,0 @@
#! /usr/bin/env bash
ROOT_UID=0
DEST_DIR=
# Destination directory
if [ "$UID" -eq "$ROOT_UID" ]; then
DEST_DIR="/usr/share/themes"
else
DEST_DIR="$HOME/.themes"
fi
THEME_NAME=Colloid
THEME_VARIANTS=('' '-purple' '-pink' '-red' '-orange' '-yellow' '-green' '-teal' '-grey')
COLOR_VARIANTS=('' '-light' '-dark')
SIZE_VARIANTS=('' '-compact')
TYPE_VARIANTS=('' '-nord' '-dracula')
SCREEN_VARIANTS=('' '-hdpi' '-xhdpi')
clean() {
local dest=${1}
local name=${2}
local theme=${3}
local color=${4}
local size=${5}
local type=${6}
local screen=${7}
local THEME_DIR=${dest}/${name}${theme}${color}${size}${type}${screen}
if [[ ${theme} == '' && ${color} == '' && ${size} == '' && ${type} == '' ]]; then
cleantheme='none'
elif [[ -d ${THEME_DIR} ]]; then
rm -rf ${THEME_DIR}
echo -e "Find: ${THEME_DIR} ! removing it ..."
fi
}
clean_theme() {
for theme in "${themes[@]-${THEME_VARIANTS[@]}}"; do
for color in "${colors[@]-${COLOR_VARIANTS[@]}}"; do
for size in "${sizes[@]-${SIZE_VARIANTS[@]}}"; do
for type in "${types[@]-${TYPE_VARIANTS[@]}}"; do
for screen in "${screens[@]-${SCREEN_VARIANTS[@]}}"; do
clean "${dest:-${DEST_DIR}}" "${name:-${THEME_NAME}}" "${theme}" "${color}" "${size}" "${type}" "${screen}"
done
done
done
done
done
}
clean_theme
exit 0

View File

@@ -136,13 +136,6 @@ install() {
sassc $SASSC_OPT "${SRC_DIR}/main/gtk-4.0/gtk${color}.scss" "${THEME_DIR}/gtk-4.0/gtk.css"
sassc $SASSC_OPT "${SRC_DIR}/main/gtk-4.0/gtk-Dark.scss" "${THEME_DIR}/gtk-4.0/gtk-dark.css"
# link gtk4.0 for libadwaita
mkdir -p "${HOME}/.config/gtk-4.0"
rm -rf "${HOME}/.config/gtk-4.0/"{assets,gtk.css,gtk-dark.css}
ln -sf "${THEME_DIR}/gtk-4.0/assets" "${HOME}/.config/gtk-4.0/assets"
ln -sf "${THEME_DIR}/gtk-4.0/gtk.css" "${HOME}/.config/gtk-4.0/gtk.css"
ln -sf "${THEME_DIR}/gtk-4.0/gtk-dark.css" "${HOME}/.config/gtk-4.0/gtk-dark.css"
mkdir -p "${THEME_DIR}/cinnamon"
cp -r "${SRC_DIR}/assets/cinnamon/common-assets" "${THEME_DIR}/cinnamon/assets"
cp -r "${SRC_DIR}/assets/cinnamon/assets${ELSE_DARK:-}/"*'.svg' "${THEME_DIR}/cinnamon/assets"
@@ -494,6 +487,72 @@ theme_tweaks() {
fi
}
link_libadwaita() {
local dest="${1}"
local name="${2}"
local theme="${3}"
local color="${4}"
local size="${5}"
local ctype="${6}"
local THEME_DIR="${1}/${2}${3}${4}${5}${6}"
[[ -L "${HOME}/.config/gtk-4.0/assets" ]] && rm -rf "${HOME}/.config/gtk-4.0/assets"
[[ -L "${HOME}/.config/gtk-4.0/gtk.css" ]] && rm -rf "${HOME}/.config/gtk-4.0/gtk.css"
[[ -L "${HOME}/.config/gtk-4.0/gtk-dark.css" ]] && rm -rf "${HOME}/.config/gtk-4.0/gtk-dark.css"
echo -e "\nLink '$THEME_DIR/gtk-4.0' to '${HOME}/.config/gtk-4.0' for libadwaita..."
mkdir -p "${HOME}/.config/gtk-4.0"
rm -rf "${HOME}/.config/gtk-4.0/"{assets,gtk.css,gtk-dark.css}
ln -sf "${THEME_DIR}/gtk-4.0/assets" "${HOME}/.config/gtk-4.0/assets"
ln -sf "${THEME_DIR}/gtk-4.0/gtk.css" "${HOME}/.config/gtk-4.0/gtk.css"
ln -sf "${THEME_DIR}/gtk-4.0/gtk-dark.css" "${HOME}/.config/gtk-4.0/gtk-dark.css"
}
link_theme() {
for theme in "${themes[@]}"; do
for color in "${colors[1]}"; do
for size in "${sizes[@]}"; do
link_libadwaita "${dest:-$DEST_DIR}" "${_name:-$THEME_NAME}" "$theme" "$color" "$size" "$ctype"
done
done
done
}
clean() {
local dest=${1}
local name=${2}
local theme=${3}
local color=${4}
local size=${5}
local type=${6}
local screen=${7}
local THEME_DIR=${dest}/${name}${theme}${color}${size}${type}${screen}
if [[ ${theme} == '' && ${color} == '' && ${size} == '' && ${type} == '' ]]; then
cleantheme='none'
elif [[ -d ${THEME_DIR} ]]; then
rm -rf ${THEME_DIR}
echo -e "Find: ${THEME_DIR} ! removing it ..."
fi
}
clean_theme() {
for theme in '' '-purple' '-pink' '-red' '-orange' '-yellow' '-green' '-teal' '-grey'; do
for color in '' '-light' '-dark'; do
for size in '' '-compact'; do
for type in '' '-nord' '-dracula'; do
for screen in '' '-hdpi' '-xhdpi'; do
clean "${dest:-${DEST_DIR}}" "${name:-${THEME_NAME}}" "${theme}" "${color}" "${size}" "${type}" "${screen}"
done
done
done
done
done
}
install_theme() {
for theme in "${themes[@]}"; do
for color in "${colors[@]}"; do
@@ -509,9 +568,7 @@ install_theme() {
fi
}
./clean-old-theme.sh
install_package && tweaks_temp && gnome_shell_version && install_theme
clean_theme && install_package && tweaks_temp && gnome_shell_version && install_theme && link_theme
echo
echo Done.

View File

@@ -2353,7 +2353,6 @@ StEntry StLabel.hint-text, .popup-menu .search-entry StLabel.hint-text {
-arrow-rise: 6px;
-arrow-box-shadow: none;
background: transparent;
box-shadow: none;
}
.popup-menu {

View File

@@ -2353,7 +2353,6 @@ StEntry StLabel.hint-text, .popup-menu .search-entry StLabel.hint-text {
-arrow-rise: 6px;
-arrow-box-shadow: none;
background: transparent;
box-shadow: none;
}
.popup-menu {

View File

@@ -2192,7 +2192,7 @@ tabbox > tab:checked, notebook > header tab:checked {
transition: all 75ms cubic-bezier(0, 0, 0.2, 1);
background-color: rgba(255, 255, 255, 0.15);
color: #FFFFFF;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
tabbox > tab:checked:disabled, notebook > header tab:checked:disabled {

View File

@@ -2192,7 +2192,7 @@ tabbox > tab:checked, notebook > header tab:checked {
transition: all 75ms cubic-bezier(0, 0, 0.2, 1);
background-color: white;
color: rgba(0, 0, 0, 0.87);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
tabbox > tab:checked:disabled, notebook > header tab:checked:disabled {

View File

@@ -881,7 +881,7 @@ windowcontrols button:not(.suggested-action):not(.destructive-action) label, fil
padding: 0;
}
placessidebar.sidebar row button.sidebar-button, notebook > header tab button.flat, popover.menu box.circular-buttons button.circular.image-button.model, spinbutton.vertical > button, spinbutton:not(.vertical) > button {
placessidebar.sidebar row button.sidebar-button, notebook > header > tabs > tab button.flat, popover.menu box.circular-buttons button.circular.image-button.model, spinbutton.vertical > button, spinbutton:not(.vertical) > button {
min-height: 24px;
min-width: 24px;
padding: 0;
@@ -2295,11 +2295,12 @@ magnifier {
/*************
* Notebooks *
*************/
tabbar tab, notebook > header tab {
tabbar tab, notebook > header > tabs > tab {
transition: all 75ms cubic-bezier(0, 0, 0.2, 1), background-size 0ms, background-image 0ms;
min-height: 24px;
min-width: 24px;
padding: 3px 12px;
margin: 0;
border: none;
outline: none;
background-clip: padding-box;
@@ -2310,25 +2311,26 @@ tabbar tab, notebook > header tab {
background-color: transparent;
}
tabbar tab:hover, notebook > header tab:hover {
tabbar tab:hover, notebook > header > tabs > tab:hover {
background-color: rgba(255, 255, 255, 0.04);
background-image: none;
color: #FFFFFF;
box-shadow: none;
}
tabbar tab:disabled, notebook > header tab:disabled {
tabbar tab:disabled, notebook > header > tabs > tab:disabled {
color: rgba(255, 255, 255, 0.3);
}
tabbar tab:checked, notebook > header tab:checked {
tabbar tab:checked, notebook > header > tabs > tab:checked {
transition: all 75ms cubic-bezier(0, 0, 0.2, 1);
background-color: rgba(255, 255, 255, 0.15);
color: #FFFFFF;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
background-image: none;
}
tabbar tab:checked:disabled, notebook > header tab:checked:disabled {
tabbar tab:checked:disabled, notebook > header > tabs > tab:checked:disabled {
color: rgba(255, 255, 255, 0.5);
}
@@ -2410,53 +2412,63 @@ notebook > header > tabs > arrow {
border-radius: 6px;
}
notebook > header tab > box {
notebook > header > tabs > tab > box {
transition: background-color 75ms cubic-bezier(0, 0, 0.2, 1);
margin: -6px -12px;
padding: 6px 12px;
}
notebook > header tab > box:drop(active) {
notebook > header > tabs > tab > box:drop(active) {
background-color: rgba(255, 255, 255, 0.12);
color: #FFFFFF;
}
notebook > header tab button.flat:last-child {
notebook > header > tabs > tab button.flat:last-child {
margin-left: 6px;
margin-right: -6px;
}
notebook > header tab button.flat:first-child {
notebook > header > tabs > tab button.flat:first-child {
margin-left: -6px;
margin-right: 6px;
}
notebook > header tab button.close-button {
notebook > header > tabs > tab button.close-button {
min-width: 24px;
min-height: 24px;
}
notebook > header.top tabs:not(:only-child):first-child, notebook > header.bottom tabs:not(:only-child):first-child {
notebook > header.top > tabs, notebook > header.bottom > tabs {
padding-left: 0;
padding-right: 0;
}
notebook > header.top > tabs:not(:only-child):first-child, notebook > header.bottom > tabs:not(:only-child):first-child {
margin-left: 0;
}
notebook > header.top tabs:not(:only-child):last-child, notebook > header.bottom tabs:not(:only-child):last-child {
notebook > header.top > tabs:not(:only-child):last-child, notebook > header.bottom > tabs:not(:only-child):last-child {
margin-right: 0;
}
notebook > header.top tabs tab.reorderable-page, notebook > header.bottom tabs tab.reorderable-page {
notebook > header.top > tabs tab.reorderable-page, notebook > header.bottom > tabs tab.reorderable-page {
border-style: solid;
}
notebook > header.left tabs:not(:only-child):first-child, notebook > header.right tabs:not(:only-child):first-child {
notebook > header.left > tabs, notebook > header.right > tabs {
padding-top: 0;
padding-bottom: 0;
}
notebook > header.left > tabs:not(:only-child):first-child, notebook > header.right > tabs:not(:only-child):first-child {
margin-top: 0;
}
notebook > header.left tabs:not(:only-child):last-child, notebook > header.right tabs:not(:only-child):last-child {
notebook > header.left > tabs:not(:only-child):last-child, notebook > header.right > tabs:not(:only-child):last-child {
margin-bottom: 0;
}
notebook > header.left tabs tab.reorderable-page, notebook > header.right tabs tab.reorderable-page {
notebook > header.left > tabs tab.reorderable-page, notebook > header.right > tabs tab.reorderable-page {
border-style: solid;
}
@@ -2657,6 +2669,13 @@ scrollbar.right {
border-left: 1px solid rgba(255, 255, 255, 0.12);
}
scrollbar > range > trough {
border: none;
background: none;
padding: 0;
outline: none;
}
scrollbar > range > trough > slider {
transition: background-color 75ms cubic-bezier(0, 0, 0.2, 1);
min-width: 8px;

View File

@@ -881,7 +881,7 @@ windowcontrols button:not(.suggested-action):not(.destructive-action) label, fil
padding: 0;
}
placessidebar.sidebar row button.sidebar-button, notebook > header tab button.flat, popover.menu box.circular-buttons button.circular.image-button.model, spinbutton.vertical > button, spinbutton:not(.vertical) > button {
placessidebar.sidebar row button.sidebar-button, notebook > header > tabs > tab button.flat, popover.menu box.circular-buttons button.circular.image-button.model, spinbutton.vertical > button, spinbutton:not(.vertical) > button {
min-height: 24px;
min-width: 24px;
padding: 0;
@@ -2303,11 +2303,12 @@ magnifier {
/*************
* Notebooks *
*************/
tabbar tab, notebook > header tab {
tabbar tab, notebook > header > tabs > tab {
transition: all 75ms cubic-bezier(0, 0, 0.2, 1), background-size 0ms, background-image 0ms;
min-height: 24px;
min-width: 24px;
padding: 3px 12px;
margin: 0;
border: none;
outline: none;
background-clip: padding-box;
@@ -2318,25 +2319,26 @@ tabbar tab, notebook > header tab {
background-color: transparent;
}
tabbar tab:hover, notebook > header tab:hover {
tabbar tab:hover, notebook > header > tabs > tab:hover {
background-color: rgba(0, 0, 0, 0.04);
background-image: none;
color: rgba(0, 0, 0, 0.87);
box-shadow: none;
}
tabbar tab:disabled, notebook > header tab:disabled {
tabbar tab:disabled, notebook > header > tabs > tab:disabled {
color: rgba(0, 0, 0, 0.26);
}
tabbar tab:checked, notebook > header tab:checked {
tabbar tab:checked, notebook > header > tabs > tab:checked {
transition: all 75ms cubic-bezier(0, 0, 0.2, 1);
background-color: white;
color: rgba(0, 0, 0, 0.87);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
background-image: none;
}
tabbar tab:checked:disabled, notebook > header tab:checked:disabled {
tabbar tab:checked:disabled, notebook > header > tabs > tab:checked:disabled {
color: rgba(0, 0, 0, 0.38);
}
@@ -2418,53 +2420,63 @@ notebook > header > tabs > arrow {
border-radius: 6px;
}
notebook > header tab > box {
notebook > header > tabs > tab > box {
transition: background-color 75ms cubic-bezier(0, 0, 0.2, 1);
margin: -6px -12px;
padding: 6px 12px;
}
notebook > header tab > box:drop(active) {
notebook > header > tabs > tab > box:drop(active) {
background-color: rgba(0, 0, 0, 0.12);
color: rgba(0, 0, 0, 0.87);
}
notebook > header tab button.flat:last-child {
notebook > header > tabs > tab button.flat:last-child {
margin-left: 6px;
margin-right: -6px;
}
notebook > header tab button.flat:first-child {
notebook > header > tabs > tab button.flat:first-child {
margin-left: -6px;
margin-right: 6px;
}
notebook > header tab button.close-button {
notebook > header > tabs > tab button.close-button {
min-width: 24px;
min-height: 24px;
}
notebook > header.top tabs:not(:only-child):first-child, notebook > header.bottom tabs:not(:only-child):first-child {
notebook > header.top > tabs, notebook > header.bottom > tabs {
padding-left: 0;
padding-right: 0;
}
notebook > header.top > tabs:not(:only-child):first-child, notebook > header.bottom > tabs:not(:only-child):first-child {
margin-left: 0;
}
notebook > header.top tabs:not(:only-child):last-child, notebook > header.bottom tabs:not(:only-child):last-child {
notebook > header.top > tabs:not(:only-child):last-child, notebook > header.bottom > tabs:not(:only-child):last-child {
margin-right: 0;
}
notebook > header.top tabs tab.reorderable-page, notebook > header.bottom tabs tab.reorderable-page {
notebook > header.top > tabs tab.reorderable-page, notebook > header.bottom > tabs tab.reorderable-page {
border-style: solid;
}
notebook > header.left tabs:not(:only-child):first-child, notebook > header.right tabs:not(:only-child):first-child {
notebook > header.left > tabs, notebook > header.right > tabs {
padding-top: 0;
padding-bottom: 0;
}
notebook > header.left > tabs:not(:only-child):first-child, notebook > header.right > tabs:not(:only-child):first-child {
margin-top: 0;
}
notebook > header.left tabs:not(:only-child):last-child, notebook > header.right tabs:not(:only-child):last-child {
notebook > header.left > tabs:not(:only-child):last-child, notebook > header.right > tabs:not(:only-child):last-child {
margin-bottom: 0;
}
notebook > header.left tabs tab.reorderable-page, notebook > header.right tabs tab.reorderable-page {
notebook > header.left > tabs tab.reorderable-page, notebook > header.right > tabs tab.reorderable-page {
border-style: solid;
}
@@ -2665,6 +2677,13 @@ scrollbar.right {
border-left: 1px solid rgba(0, 0, 0, 0.12);
}
scrollbar > range > trough {
border: none;
background: none;
padding: 0;
outline: none;
}
scrollbar > range > trough > slider {
transition: background-color 75ms cubic-bezier(0, 0, 0.2, 1);
min-width: 8px;

View File

@@ -1899,7 +1899,7 @@ popover.background {
transition: $transition;
background-color: if($variant == 'light', rgba($base, 1), rgba(white, 0.15));
color: $text;
box-shadow: 0 1px 3px rgba(black, 0.06);
box-shadow: 0 1px 3px rgba(black, 0.1);
&:disabled { color: $text-disabled; }
}

View File

@@ -2124,6 +2124,7 @@ magnifier {
min-height: $small-size;
min-width: $small-size;
padding: $space-size / 2 $space-size * 2;
margin: 0;
border: none;
outline: none;
background-clip: padding-box;
@@ -2137,6 +2138,7 @@ magnifier {
background-color: $fill;
background-image: none;
color: $text;
box-shadow: none;
}
&:disabled { color: $text-secondary-disabled; }
@@ -2145,7 +2147,7 @@ magnifier {
transition: $transition;
background-color: if($variant == 'light', rgba($base, 1), rgba(white, 0.15));
color: $text;
box-shadow: 0 1px 3px rgba(black, 0.06);
box-shadow: 0 1px 3px rgba(black, 0.1);
background-image: none;
&:disabled { color: $text-disabled; }
@@ -2236,7 +2238,8 @@ notebook {
}
}
> tabs > arrow {
> tabs {
> arrow {
@extend %button-flat-simple;
min-height: 16px;
@@ -2244,7 +2247,7 @@ notebook {
border-radius: $corner-radius;
}
tab {
> tab {
@extend %tabs_tab;
// FIXME: The tab node doesn't have :drop(active), instead its child box has it.
@@ -2279,12 +2282,13 @@ notebook {
min-height: $small-size;
}
}
}
&.top,
&.bottom {
tabs {
// padding-left: 8px;
// padding-right: 8px;
> tabs {
padding-left: 0;
padding-right: 0;
&:not(:only-child) {
&:first-child { margin-left: 0; }
@@ -2298,9 +2302,9 @@ notebook {
&.left,
&.right {
tabs {
// padding-top: 8px;
// padding-bottom: 8px;
> tabs {
padding-top: 0;
padding-bottom: 0;
&:not(:only-child) {
&:first-child { margin-top: 0; }
@@ -2563,7 +2567,13 @@ scrollbar {
&.right { border-left: 1px solid $divider; }
// slider
> range > trough > slider {
> range > trough {
border: none;
background: none;
padding: 0;
outline: none;
> slider {
transition: background-color $duration $ease-out;
min-width: 8px;
min-height: 8px;
@@ -2580,6 +2590,7 @@ scrollbar {
&:disabled { background-color: $text-secondary-disabled; }
}
}
> range.fine-tune {
> trough > slider {