Add Gtk+ 4.0 theme support!

This commit is contained in:
Vince 2021-04-09 20:03:06 +08:00
parent 2230540f9b
commit 95c51b30f8
934 changed files with 5946 additions and 299 deletions

2
.gitignore vendored
View file

@ -3,8 +3,10 @@
_theme-options-temp.scss
*.css.map
src/main/gtk-3.0/gtk*.css
src/main/gtk-4.0/gtk*.css
src/main/cinnamon/cinnamon*.css
src/main/gnome-shell/gnome-shell*.css
src/main/gnome-shell/gdm3*.css
src/other/dash-to-dock/stylesheet.css
src/other/dash-to-dock/stylesheet-dark.css
parse-sass.sh

View file

@ -71,7 +71,8 @@ install_darky() {
local opacity="$(destify ${1})"
local theme="$(destify ${2})"
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-3.0/gtk-dark${opacity}${theme}.scss" "${WHITESUR_TMP_DIR}/darky${opacity}${theme}.css"
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-3.0/gtk-dark${opacity}${theme}.scss" "${WHITESUR_TMP_DIR}/darky-3${opacity}${theme}.css"
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-4.0/gtk-dark${opacity}${theme}.scss" "${WHITESUR_TMP_DIR}/darky-4${opacity}${theme}.css"
}
install_shelly() {
@ -128,7 +129,8 @@ install_theemy() {
local icon="$(destify ${5})"
local TARGET_DIR="${dest}/${name}${color}${opacity}${alt}${theme}"
local TMP_DIR="${WHITESUR_TMP_DIR}/gtk${color}${opacity}${alt}${theme}"
local TMP_DIR_T="${WHITESUR_TMP_DIR}/gtk-3.0${color}${opacity}${alt}${theme}"
local TMP_DIR_F="${WHITESUR_TMP_DIR}/gtk-4.0${color}${opacity}${alt}${theme}"
mkdir -p "${TARGET_DIR}"
local desktop_entry="
@ -146,30 +148,50 @@ install_theemy() {
ButtonLayout=close,minimize,maximize:menu"
echo "${desktop_entry}" > "${TARGET_DIR}/index.theme"
#----------------------GTK-----------------------#
#--------------------GTK-3.0--------------------#
mkdir -p "${TMP_DIR}"
cp -r "${THEME_SRC_DIR}/assets/gtk-3.0/common-assets/assets" "${TMP_DIR}"
cp -r "${THEME_SRC_DIR}/assets/gtk-3.0/common-assets/sidebar-assets/"*".png" "${TMP_DIR}/assets"
cp -r "${THEME_SRC_DIR}/assets/gtk-3.0/windows-assets/titlebutton${alt}" "${TMP_DIR}/windows-assets"
mkdir -p "${TMP_DIR_T}"
cp -r "${THEME_SRC_DIR}/assets/gtk/common-assets/assets" "${TMP_DIR_T}"
cp -r "${THEME_SRC_DIR}/assets/gtk/common-assets/sidebar-assets/"*".png" "${TMP_DIR_T}/assets"
cp -r "${THEME_SRC_DIR}/assets/gtk/windows-assets/titlebutton${alt}" "${TMP_DIR_T}/windows-assets"
if [[ "${theme}" != '' ]]; then
cp -r "${THEME_SRC_DIR}/assets/gtk-3.0/common-assets/assets${theme}/"*".png" "${TMP_DIR}/assets"
cp -r "${THEME_SRC_DIR}/assets/gtk/common-assets/assets${theme}/"*".png" "${TMP_DIR_T}/assets"
fi
if [[ "${color}" == '-light' ]]; then
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-3.0/gtk-light${opacity}${theme}.scss" "${TMP_DIR}/gtk.css"
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-3.0/gtk-light${opacity}${theme}.scss" "${TMP_DIR_T}/gtk.css"
else
cp -r "${WHITESUR_TMP_DIR}/darky${opacity}${theme}.css" "${TMP_DIR}/gtk.css"
cp -r "${WHITESUR_TMP_DIR}/darky-3${opacity}${theme}.css" "${TMP_DIR_T}/gtk.css"
fi
cp -r "${WHITESUR_TMP_DIR}/darky${opacity}${theme}.css" "${TMP_DIR}/gtk-dark.css"
cp -r "${WHITESUR_TMP_DIR}/darky-3${opacity}${theme}.css" "${TMP_DIR_T}/gtk-dark.css"
mkdir -p "${TARGET_DIR}/gtk-3.0"
cp -r "${THEME_SRC_DIR}/assets/gtk-3.0/thumbnails/thumbnail${color}${theme}.png" "${TARGET_DIR}/gtk-3.0/thumbnail.png"
cp -r "${THEME_SRC_DIR}/assets/gtk/thumbnails/thumbnail${color}${theme}.png" "${TARGET_DIR}/gtk-3.0/thumbnail.png"
echo '@import url("resource:///org/gnome/theme/gtk.css");' > "${TARGET_DIR}/gtk-3.0/gtk.css"
echo '@import url("resource:///org/gnome/theme/gtk-dark.css");' > "${TARGET_DIR}/gtk-3.0/gtk-dark.css"
glib-compile-resources --sourcedir="${TMP_DIR}" --target="${TARGET_DIR}/gtk-3.0/gtk.gresource" "${THEME_SRC_DIR}/main/gtk-3.0/gtk.gresource.xml"
glib-compile-resources --sourcedir="${TMP_DIR_T}" --target="${TARGET_DIR}/gtk-3.0/gtk.gresource" "${THEME_SRC_DIR}/main/gtk-3.0/gtk.gresource.xml"
#--------------------GTK-4.0--------------------#
mkdir -p "${TMP_DIR_F}"
cp -r "${TMP_DIR_T}/assets" "${TMP_DIR_F}"
cp -r "${TMP_DIR_T}/windows-assets" "${TMP_DIR_F}"
if [[ "${color}" == '-light' ]]; then
sassc ${SASSC_OPT} "${THEME_SRC_DIR}/main/gtk-4.0/gtk-light${opacity}${theme}.scss" "${TMP_DIR_F}/gtk.css"
else
cp -r "${WHITESUR_TMP_DIR}/darky-4${opacity}${theme}.css" "${TMP_DIR_F}/gtk.css"
fi
cp -r "${WHITESUR_TMP_DIR}/darky-4${opacity}${theme}.css" "${TMP_DIR_F}/gtk-dark.css"
mkdir -p "${TARGET_DIR}/gtk-4.0"
cp -r "${THEME_SRC_DIR}/assets/gtk/thumbnails/thumbnail${color}${theme}.png" "${TARGET_DIR}/gtk-4.0/thumbnail.png"
echo '@import url("resource:///org/gnome/theme/gtk.css");' > "${TARGET_DIR}/gtk-4.0/gtk.css"
echo '@import url("resource:///org/gnome/theme/gtk-dark.css");' > "${TARGET_DIR}/gtk-4.0/gtk-dark.css"
glib-compile-resources --sourcedir="${TMP_DIR_F}" --target="${TARGET_DIR}/gtk-4.0/gtk.gresource" "${THEME_SRC_DIR}/main/gtk-4.0/gtk.gresource.xml"
#----------------Cinnamon-----------------#

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.1" viewBox="0 0 6.35 6.35" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m1.5875 1.5875h0.26458c0.00274-3.18e-5 0.0055-1.217e-4 0.00827 0 0.067456 0.00296 0.1349 0.03402 0.1819 0.082682l1.1336 1.1328 1.1402-1.1328c0.07028-0.060986 0.11818-0.08083 0.1819-0.082682h0.26458v0.26458c0 0.075795-0.00909 0.14569-0.066146 0.19844l-1.1319 1.1245 1.1236 1.1327c0.049791 0.049787 0.074412 0.11998 0.074414 0.19017v0.26458h-0.26458c-0.070194-2.6e-6 -0.14038-0.024633-0.19017-0.074414l-1.1319-1.1327-1.1336 1.1327c-0.049785 0.049792-0.11998 0.074414-0.19017 0.074414h-0.26458v-0.26458c-8e-7 -0.070191 0.024622-0.14038 0.074414-0.19017l1.1336-1.1327-1.1336-1.1245c-0.055759-0.051496-0.080211-0.12416-0.074414-0.19844z" color="#bebebe" enable-background="new" fill="#333" style="text-decoration-line:none;text-indent:0;text-transform:none"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 432 B

View file

Before

Width:  |  Height:  |  Size: 676 B

After

Width:  |  Height:  |  Size: 676 B

View file

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 414 B

View file

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 323 B

View file

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 487 B

View file

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 630 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 438 B

View file

Before

Width:  |  Height:  |  Size: 825 B

After

Width:  |  Height:  |  Size: 825 B

View file

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 578 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 396 B

View file

Before

Width:  |  Height:  |  Size: 706 B

After

Width:  |  Height:  |  Size: 706 B

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 426 B

After

Width:  |  Height:  |  Size: 426 B

View file

Before

Width:  |  Height:  |  Size: 667 B

After

Width:  |  Height:  |  Size: 667 B

View file

Before

Width:  |  Height:  |  Size: 409 B

After

Width:  |  Height:  |  Size: 409 B

View file

Before

Width:  |  Height:  |  Size: 320 B

After

Width:  |  Height:  |  Size: 320 B

View file

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 479 B

View file

Before

Width:  |  Height:  |  Size: 623 B

After

Width:  |  Height:  |  Size: 623 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 436 B

View file

Before

Width:  |  Height:  |  Size: 829 B

After

Width:  |  Height:  |  Size: 829 B

View file

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 574 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 396 B

View file

Before

Width:  |  Height:  |  Size: 706 B

After

Width:  |  Height:  |  Size: 706 B

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 378 B

View file

Before

Width:  |  Height:  |  Size: 607 B

After

Width:  |  Height:  |  Size: 607 B

View file

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 401 B

View file

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 304 B

View file

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 442 B

View file

Before

Width:  |  Height:  |  Size: 416 B

After

Width:  |  Height:  |  Size: 416 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 426 B

After

Width:  |  Height:  |  Size: 426 B

View file

Before

Width:  |  Height:  |  Size: 804 B

After

Width:  |  Height:  |  Size: 804 B

View file

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 383 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 388 B

View file

Before

Width:  |  Height:  |  Size: 701 B

After

Width:  |  Height:  |  Size: 701 B

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 432 B

View file

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

View file

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 323 B

View file

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 475 B

View file

Before

Width:  |  Height:  |  Size: 634 B

After

Width:  |  Height:  |  Size: 634 B

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 440 B

View file

Before

Width:  |  Height:  |  Size: 825 B

After

Width:  |  Height:  |  Size: 825 B

View file

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 578 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 396 B

View file

Before

Width:  |  Height:  |  Size: 705 B

After

Width:  |  Height:  |  Size: 705 B

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 416 B

After

Width:  |  Height:  |  Size: 416 B

View file

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 675 B

View file

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 418 B

View file

Before

Width:  |  Height:  |  Size: 319 B

After

Width:  |  Height:  |  Size: 319 B

View file

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 479 B

Some files were not shown because too many files have changed in this diff Show more