Merge pull request #47 from imarkoff/47-48

GNOME 47 support
This commit is contained in:
Vladyslav Hroshev
2025-03-08 22:58:39 +02:00
committed by GitHub
42 changed files with 493 additions and 325 deletions

View File

@@ -41,7 +41,7 @@ Icon theme: https://github.com/vinceliuice/Colloid-icon-theme
</details>
## 🚧 Requirements
- GNOME 43-46. Correct functionality on other versions is not guaranteed.
- GNOME 42-47. Correct functionality on other versions is not guaranteed.
- [User Themes](https://extensions.gnome.org/extension/19/user-themes/ "User Themes") extension.
- Python 3.2+.
@@ -68,6 +68,13 @@ Icon theme: https://github.com/vinceliuice/Colloid-icon-theme
![User Themes in Extensions](./readme-images/user-themes-settings.png)
5. Select the shell theme you want.
> [!TIP]
> For updating the theme, run the `git pull` command in the `Marble-shell-theme` directory and run the program again.
> If Marble theme is used, updates will be applied automatically.
> [!TIP]
> If you want to install only one color, use the `--red`, `--yellow`, `--green`, `--blue`, `--purple`, `--gray` option.
## 🖥️ GDM theme

View File

@@ -284,7 +284,7 @@
"dark" : {
"s" : 7,
"l" : 8,
"l" : 10,
"a" : 0.95
}
},
@@ -299,7 +299,7 @@
"dark" : {
"s" : 7,
"l" : 8,
"l" : 9,
"a" : 1
}
},
@@ -355,9 +355,9 @@
"_comment" : "Used as primary color in text",
"light" : {
"s" : 71,
"l" : 10,
"a" : 0.87
"s" : 31,
"l" : 20,
"a" : 1
},
"dark" : {
@@ -430,15 +430,15 @@
"TEXT-BLACK-COLOR" : {
"light" : {
"s" : 71,
"l" : 10,
"a" : 0.87
"s" : 31,
"l" : 20,
"a" : 1
},
"dark" : {
"s" : 71,
"l" : 10,
"a" : 0.87
"s" : 31,
"l" : 20,
"a" : 1
}
},
"TEXT-BLACK_SECONDARY" : {

View File

@@ -1,5 +1,5 @@
# This file installs Marble shell theme for GNOME DE
# Copyright (C) 2023-2024 Vladyslav Hroshev
# Copyright (C) 2023-2025 Vladyslav Hroshev
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import json # working with json files
import argparse # command-line options
import shutil
@@ -24,6 +23,7 @@ from scripts import config # folder and files definitions
from scripts.tweaks_manager import TweaksManager # load tweaks from files
from scripts.utils import remove_files # delete already installed Marble theme
from scripts.utils.gnome import apply_gnome_theme # apply theme to GNOME shell
from scripts.theme import Theme
from scripts.gdm import GlobalTheme
@@ -202,6 +202,8 @@ def main():
else:
local_theme(args, colors)
apply_gnome_theme()
# TODO: inform user about already applied theme. if not, apply it manually
if __name__ == "__main__":

View File

@@ -1,3 +1,5 @@
# TODO: Add more tests
import unittest
import os
import json

View File

@@ -33,7 +33,10 @@ class Theme:
# move files to temp folder
copy_files(self.theme_folder, self.temp_folder)
generate_file(f"{self.theme_folder}_css/", self.main_styles)
generate_file(f"{self.theme_folder}", self.main_styles)
# after generating main styles, remove .css and .versions folders
shutil.rmtree(f"{self.temp_folder}/.css/", ignore_errors=True)
shutil.rmtree(f"{self.temp_folder}/.versions/", ignore_errors=True)
# if theme is filled
if is_filled:

View File

@@ -1,230 +0,0 @@
import os
from . import config # name of folders and files
def generate_file(folder, final_file):
"""
Combines all files in a folder into a single file
:param folder: source folder
:param final_file: location where file will be created
"""
opened_file = open(final_file, "w")
for file in os.listdir(folder):
with open(folder + file) as f:
opened_file.write(f.read() + '\n')
opened_file.close()
def concatenate_files(edit_file, file):
"""
Merge two files
:param edit_file: where it will be appended
:param file: file you want to append
"""
with open(file, 'r') as read_file:
file_content = read_file.read()
with open(edit_file, 'a') as write_file:
write_file.write('\n' + file_content)
def remove_files():
"""
Delete already installed Marble theme
"""
paths = (config.themes_folder, "~/.local/share/themes")
print("💡 You do not need to delete files if you want to update theme.\n")
confirmation = input(f"Do you want to delete all \"Marble\" folders in {' and in '.join(paths)}? (y/N) ").lower()
if confirmation == "y":
for path in paths:
# Check if the path exists
if os.path.exists(os.path.expanduser(path)):
# Get the list of folders in the path
folders = os.listdir(os.path.expanduser(path))
# toggle if folder has no marble theme
found_folder = False
for folder in folders:
if folder.startswith("Marble"):
folder_path = os.path.join(os.path.expanduser(path), folder)
print(f"Deleting folder {folder_path}...", end='')
try:
os.system(f"rm -r {folder_path}")
except Exception as e:
print(f"Error deleting folder {folder_path}: {e}")
else:
found_folder = True
print("Done.")
if not found_folder:
print(f"No folders starting with \"Marble\" found in {path}.")
else:
print(f"The path {path} does not exist.")
def destination_return(themes_folder, path_name, theme_mode, theme_type):
"""
Copied/modified theme location
:param themes_folder: themes folder location
:param path_name: color name
:param theme_mode: theme name (light or dark)
:param theme_type: theme type (gnome-shell, gtk-4.0, ...)
:return: copied files' folder location
"""
return f"{themes_folder}/Marble-{path_name}-{theme_mode}/{theme_type}/"
def copy_files(source, destination):
"""
Copy files from the source to another directory
:param source: where files will be copied
:param destination: where files will be pasted
"""
destination = os.path.expanduser(destination) # expand ~ to /home/user
os.makedirs(destination, exist_ok=True)
os.system(f"cp -aT {source} {destination}")
def replace_keywords(file, *args):
"""
Replace file with several keywords
:param file: file name where keywords must be replaced
:param args: (keyword, replacement), (...), ...
"""
# skip binary files in project
if not file.lower().endswith(('.css', '.scss', '.svg')):
return
with open(file, "r") as read_file:
content = read_file.read()
for keyword, replacement in args:
content = content.replace(keyword, replacement)
with open(file, "w") as write_file:
write_file.write(content)
def hex_to_rgba(hex_color):
"""
Convert hex(a) to rgba
:param hex_color: input value
"""
try:
if len(hex_color) in range(6, 10):
hex_color = hex_color.lstrip('#') + "ff"
# if is convertable
int(hex_color[:], 16)
else:
raise ValueError
except ValueError:
raise ValueError(f'Error: Invalid HEX color code: {hex_color}')
else:
return int(hex_color[0:2], 16), \
int(hex_color[2:4], 16), \
int(hex_color[4:6], 16), \
int(hex_color[6:8], 16) / 255
def label_files(directory, label, *args):
"""
Add a label to all files in a directory
:param directory: folder where files are located
:param label: label to add
:param args: files to change links to labeled files
:return:
"""
# Open all files
files = [open(file, 'r') for file in args]
read_files = []
filenames = []
for filename in os.listdir(directory):
# Skip if the file is already labeled
if label in filename:
continue
# Split the filename into name and extension
name, extension = os.path.splitext(filename)
# Form the new filename and rename the file
new_filename = f"{name}-{label}{extension}"
os.rename(os.path.join(directory, filename), os.path.join(directory, new_filename))
filenames.append((filename, new_filename))
# Replace the filename in all files
for i, file in enumerate(files):
read_file = file.read()
read_file.replace(filenames[i][0], filenames[i][1])
read_files.append(read_file)
file.close()
write_files = [open(file, 'w') for file in args]
# Write the changes to the files and close them
for i, file in enumerate(write_files):
file.write(read_files[i])
file.close()
def remove_properties(file, *args):
"""
Remove properties from a file
:param file: file name
:param args: properties to remove
"""
new_content = ""
with open(file, "r") as read_file:
content = read_file.read()
for line in content.splitlines():
if not any(prop in line for prop in args):
new_content += line + "\n"
elif "}" in line:
new_content += "}\n"
with open(file, "w") as write_file:
write_file.write(new_content)
def remove_keywords(file, *args):
"""
Remove keywords from a file
:param file: file name
:param args: keywords to remove
"""
with open(file, "r") as read_file:
content = read_file.read()
for arg in args:
content = content.replace(arg, "")
with open(file, "w") as write_file:
write_file.write(content)

10
scripts/utils/__init__.py Normal file
View File

@@ -0,0 +1,10 @@
from .concatenate_files import concatenate_files
from .copy_files import copy_files
from .destinaiton_return import destination_return
from .generate_file import generate_file
from .hex_to_rgba import hex_to_rgba
from .label_files import label_files
from .remove_files import remove_files
from .remove_keywords import remove_keywords
from .remove_properties import remove_properties
from .replace_keywords import replace_keywords

View File

@@ -0,0 +1,12 @@
def concatenate_files(edit_file, file):
"""
Merge two files
:param edit_file: where it will be appended
:param file: file you want to append
"""
with open(file, 'r') as read_file:
file_content = read_file.read()
with open(edit_file, 'a') as write_file:
write_file.write('\n' + file_content)

View File

@@ -0,0 +1,12 @@
import os
def copy_files(source, destination):
"""
Copy files from the source to another directory
:param source: where files will be copied
:param destination: where files will be pasted
"""
destination = os.path.expanduser(destination) # expand ~ to /home/user
os.makedirs(destination, exist_ok=True)
os.system(f"cp -aT {source} {destination}")

View File

@@ -0,0 +1,11 @@
def destination_return(themes_folder, path_name, theme_mode, theme_type):
"""
Copied/modified theme location
:param themes_folder: themes folder location
:param path_name: color name
:param theme_mode: theme name (light or dark)
:param theme_type: theme type (gnome-shell, gtk-4.0, ...)
:return: copied files' folder location
"""
return f"{themes_folder}/Marble-{path_name}-{theme_mode}/{theme_type}/"

View File

@@ -0,0 +1,37 @@
import os
import shutil
from .gnome import gnome_version
from .get_version_folder import get_version_folders
def generate_file(folder, final_file):
"""
Combines all files in a folder into a single file
:param folder: source folder
:param final_file: location where file will be created
"""
opened_file = open(final_file, "w")
css_folder = f"{folder}/.css/"
for file in os.listdir(css_folder):
with open(os.path.join(css_folder, file)) as f:
opened_file.write(f.read() + '\n')
version = gnome_version()
if version:
base_path = f"{folder}/.versions/"
version_folders = get_version_folders(version, base_path)
for version_folder in version_folders:
version_path = os.path.join(base_path, version_folder)
css_path = os.path.join(version_path, '.css')
for css_file in os.listdir(css_path):
with open(os.path.join(css_path, css_file)) as f:
opened_file.write(f.read() + '\n')
for file in os.listdir(version_path):
if file.endswith('.svg'):
shutil.move(os.path.join(version_path, file), folder)
opened_file.close()

View File

@@ -0,0 +1,29 @@
import os
def get_version_folders(version, base_path):
"""
Get version folders
:param version: gnome-shell version
:param base_path: base path to version folders
:return: list of matching version folders
"""
version_folders = os.listdir(base_path)
version = int(version.split('.')[0]) # Use only the major version for comparison
matching_folders = []
for folder in version_folders:
if '..' in folder:
from_version, to_version = folder.split('..')
if from_version and to_version:
if int(from_version) <= version <= int(to_version):
matching_folders.append(folder)
elif from_version:
if version >= int(from_version):
matching_folders.append(folder)
elif to_version:
if version <= int(to_version):
matching_folders.append(folder)
elif int(folder) == version:
matching_folders.append(folder)
return matching_folders

32
scripts/utils/gnome.py Normal file
View File

@@ -0,0 +1,32 @@
import subprocess
def gnome_version():
"""
Get gnome-shell version
"""
try:
output = subprocess.check_output(['gnome-shell', '--version'], text=True).strip()
return output.split(' ')[2]
except subprocess.CalledProcessError:
return None
def apply_gnome_theme(theme=None):
"""
Apply gnome-shell theme
:param theme: theme name
"""
try:
if theme is None:
current_theme = subprocess.check_output(['dconf', 'read', '/org/gnome/shell/extensions/user-theme/name'], text=True).strip().strip("'")
if current_theme.startswith("Marble"):
theme = current_theme
else:
return False
subprocess.run(['dconf', 'reset', '/org/gnome/shell/extensions/user-theme/name'], check=True)
subprocess.run(['dconf', 'write', '/org/gnome/shell/extensions/user-theme/name', f"'{theme}'"], check=True)
except subprocess.CalledProcessError:
return False
return True

View File

@@ -0,0 +1,22 @@
def hex_to_rgba(hex_color):
"""
Convert hex(a) to rgba
:param hex_color: input value
"""
try:
if len(hex_color) in range(6, 10):
hex_color = hex_color.lstrip('#') + "ff"
# if is convertable
int(hex_color[:], 16)
else:
raise ValueError
except ValueError:
raise ValueError(f'Error: Invalid HEX color code: {hex_color}')
else:
return int(hex_color[0:2], 16), \
int(hex_color[2:4], 16), \
int(hex_color[4:6], 16), \
int(hex_color[6:8], 16) / 255

View File

@@ -0,0 +1,44 @@
import os
def label_files(directory, label, *args):
"""
Add a label to all files in a directory
:param directory: folder where files are located
:param label: label to add
:param args: files to change links to labeled files
:return:
"""
# Open all files
files = [open(file, 'r') for file in args]
read_files = []
filenames = []
for filename in os.listdir(directory):
# Skip if the file is already labeled
if label in filename:
continue
# Split the filename into name and extension
name, extension = os.path.splitext(filename)
# Form the new filename and rename the file
new_filename = f"{name}-{label}{extension}"
os.rename(os.path.join(directory, filename), os.path.join(directory, new_filename))
filenames.append((filename, new_filename))
# Replace the filename in all files
for i, file in enumerate(files):
read_file = file.read()
read_file.replace(filenames[i][0], filenames[i][1])
read_files.append(read_file)
file.close()
write_files = [open(file, 'w') for file in args]
# Write the changes to the files and close them
for i, file in enumerate(write_files):
file.write(read_files[i])
file.close()

View File

@@ -0,0 +1,48 @@
# TODO: Less verbose output for the user and simplify the code
from .. import config
import os
def remove_files():
"""
Delete already installed Marble theme
"""
paths = (config.themes_folder, "~/.local/share/themes")
print("💡 You do not need to delete files if you want to update theme.\n")
confirmation = input(f"Do you want to delete all \"Marble\" folders in {' and in '.join(paths)}? (y/N) ").lower()
if confirmation == "y":
for path in paths:
# Check if the path exists
if os.path.exists(os.path.expanduser(path)):
# Get the list of folders in the path
folders = os.listdir(os.path.expanduser(path))
# toggle if folder has no marble theme
found_folder = False
for folder in folders:
if folder.startswith("Marble"):
folder_path = os.path.join(os.path.expanduser(path), folder)
print(f"Deleting folder {folder_path}...", end='')
try:
os.system(f"rm -r {folder_path}")
except Exception as e:
print(f"Error deleting folder {folder_path}: {e}")
else:
found_folder = True
print("Done.")
if not found_folder:
print(f"No folders starting with \"Marble\" found in {path}.")
else:
print(f"The path {path} does not exist.")

View File

@@ -0,0 +1,15 @@
def remove_keywords(file, *args):
"""
Remove keywords from a file
:param file: file name
:param args: keywords to remove
"""
with open(file, "r") as read_file:
content = read_file.read()
for arg in args:
content = content.replace(arg, "")
with open(file, "w") as write_file:
write_file.write(content)

View File

@@ -0,0 +1,20 @@
def remove_properties(file, *args):
"""
Remove properties from a file
:param file: file name
:param args: properties to remove
"""
new_content = ""
with open(file, "r") as read_file:
content = read_file.read()
for line in content.splitlines():
if not any(prop in line for prop in args):
new_content += line + "\n"
elif "}" in line:
new_content += "}\n"
with open(file, "w") as write_file:
write_file.write(new_content)

View File

@@ -0,0 +1,19 @@
def replace_keywords(file, *args):
"""
Replace file with several keywords
:param file: file name where keywords must be replaced
:param args: (keyword, replacement), (...), ...
"""
# skip binary files in project
if not file.lower().endswith(('.css', '.scss', '.svg')):
return
with open(file, "r") as read_file:
content = read_file.read()
for keyword, replacement in args:
content = content.replace(keyword, replacement)
with open(file, "w") as write_file:
write_file.write(content)

View File

@@ -221,8 +221,7 @@
}
#dash .app-grid-running-dot {
margin-bottom: 12px !important; /* override because of gdm */
offset-y: 8px; /* 46.2 fix */
offset-y: -4px;
}
#dash .app-well-app:hover .app-well-app-running-dot,

View File

@@ -25,22 +25,21 @@
/* Toggles */
/* .toggle-switch handle styled in ..46, 47.. */
.toggle-switch {
background-image: url("./toggle-off.svg");
/* size same as svg */
height: 18px;
width: 33.2px;
width: 33px;
background-color: ACCENT-DISABLED_HOVER;
border-radius: 99px;
box-shadow: inset 0 0 0 1px BORDER-SHADOW !important;
}
.toggle-switch:checked {
background-image: url("./toggle-on.svg");
background-color: BUTTON-COLOR;
}
/* Do Not Distrub toggle */
.dnd-button {
@@ -50,9 +49,8 @@
.dnd-button .toggle-switch {
/* size same as svg */
width: 40px;
height: 21.7px;
height: 22px;
border-radius: 9px;
background-image: url("./toggle-off_dnd.svg");
background-color: ACCENT-DISABLED-COLOR;
transition-duration: 100ms;
}
@@ -62,7 +60,6 @@
}
.dnd-button .toggle-switch:checked {
background-image: url("./toggle-on_dnd.svg");
background-color: BUTTON-COLOR;
}
@@ -116,16 +113,23 @@
/* Sliders */
.slider,
.slider,
.level {
-barlevel-height: 16px;
-barlevel-background-color: ACCENT-DISABLED-COLOR;
-barlevel-color: TEXT-PRIMARY-COLOR;
color: TEXT-PRIMARY-COLOR; /* slider handle color (47+) */
-barlevel-active-background-color: BUTTON-COLOR;
-barlevel-border-width: 0px;
-barlevel-height: 10px;
-barlevel-border-width: 0px; /* up to 46 */
-slider-handle-radius: 7px;
/* overfill */
-barlevel-overdrive-color: #c01c28;
-barlevel-overdrive-separator-width: 2px;
-slider-handle-radius: 7px;
}
.level {
-barlevel-active-background-color: TEXT-PRIMARY-COLOR;
-barlevel-height: 8px;
}

View File

@@ -41,6 +41,7 @@
.message-list .message, .popup-menu-content .message {
background-color: SECTION-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
border-radius: 15px;
transition-duration: 100ms;
}
.message-list .message:hover {
@@ -75,7 +76,6 @@
.message-expand-button {
border-radius: 99px;
padding: 5px;
margin: 0px;
color: TEXT-PRIMARY-COLOR;
background-color: ACCENT-DISABLED-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;

View File

@@ -65,12 +65,16 @@
/* Modal dialog */
.modal-dialog {
border-radius: 20px;
padding: 12px;
background-color: BACKGROUND-COLOR;
border: none;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
color: TEXT-PRIMARY-COLOR;
}
.end-session-dialog {
width: 28em;
}
/* user avatar */
.user-icon {
@@ -92,52 +96,30 @@
/* button in modals */
.modal-dialog-linked-button,
.notification-button,
.hotplug-notification-item {
padding: 10px 0 !important;
border-radius: 12px !important;
.modal-dialog-linked-button, /* 46 */
.modal-dialog-button-box .modal-dialog-button, /* 47+ */
.notification-button {
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
background-color: ACCENT-DISABLED-COLOR;
color: TEXT-PRIMARY-COLOR;
animation-duration: 100ms;
}
/* if first button: margin-right: 12px/2 */
.modal-dialog-linked-button:ltr:first-child,
.notification-button:ltr:first-child,
.hotplug-notification-item:ltr:first-child,
.modal-dialog-linked-button:rtl:last-child,
.notification-button:rtl:last-child,
.hotplug-notification-item:rtl:last-child {
margin: 0 6px 12px 12px !important;
.modal-dialog-button-box .modal-dialog-button:focus {
box-shadow: inset 0 0 0 2px ACCENT-SECONDARY-COLOR !important;
}
/* if last button: margin-left: 12px/2 */
.modal-dialog-linked-button:ltr:last-child,
.notification-button:ltr:last-child,
.hotplug-notification-item:ltr:last-child,
.modal-dialog-linked-button:rtl:first-child,
.notification-button:rtl:first-child,
.hotplug-notification-item:rtl:first-child {
margin: 0 12px 12px 6px !important;
.modal-dialog-linked-button {
padding: 10px 0;
border-radius: 12px;
}
/* if only button: normal margin */
.modal-dialog-linked-button:first-child:last-child,
.notification-button:first-child:last-child,
.hotplug-notification-item:first-child:last-child {
margin: 0 12px 12px 12px !important;
}
/* else: margin-right/left: 12px/2 */
.modal-dialog-linked-button,
.notification-button,
.hotplug-notification-item {
margin: 0 6px 12px 6px !important;
.notification-button {
padding: 7px 12px;
border-radius: 10px;
}
/* see button spacing in ..46 and 47.. */
.modal-dialog-linked-button:hover,
.modal-dialog-linked-button:focus,
@@ -157,24 +139,19 @@
background-color: BUTTON_HOVER;
}
.modal-dialog-linked-button:focus,
.hotplug-notification-item:focus,
.notification-button:focus {
.modal-dialog-linked-button:focus {
animation-duration: 100ms;
box-shadow: inset 0 0 0 1px TEXT-DISABLED-COLOR !important;
}
.modal-dialog-linked-button:focus:hover,
.hotplug-notification-item:focus:hover,
.notification-button:focus:hover,
.modal-dialog-linked-button:focus:active,
.hotplug-notification-item:focus:active,
.notification-button:focus:active {
box-shadow: inset 0 0 0 1px TEXT-SECONDARY-COLOR !important;
}
.modal-dialog .modal-dialog-linked-button:insensitive,
.hotplug-notification-item:insensitive,
.notification-banner .notification-button:insensitive {
color: BUTTON-TEXT_SECONDARY;
background-color: BUTTON_INSENSITIVE;

View File

@@ -2,8 +2,8 @@
#panel {
background-color: BACKGROUND-OPAQUE-COLOR;
height: 36px;
font-size: 14px;
height: 34px;
font-size: 13px;
box-shadow: none;
}
@@ -13,14 +13,25 @@
transition-duration: 0.25s;
}
/* i know margin are not used cuz hitboxes of buttons don't expand to screen edges */
/* however with this trick i cannot paint button borders */
.panel-button {
margin: 4px 3px;
}
/* allows to shrink horizontal padding for app icons */
.panel-button { -natural-hpadding: 6px; }
.panel-status-indicators-box:first-child { padding-left: 3px; }
.panel-status-indicators-box:last-child { padding-right: 3px; }
.panel-status-indicators-box:first-child:last-child { padding: 0; }
.panel-button#panelActivities { -natural-hpadding: 10px; }
/* panel buttons */
.panel-button,
.panel-button .clock, /* Date & clock */
.clock-display StIcon { /* DND / new messages icon */
.panel-button .clock { /* DND / new messages icon */
color: TEXT-PRIMARY-COLOR;
border-radius: 14px;
border: 4px solid transparent !important;
border-radius: 9px;
border-width: 0px;
background-color: ACCENT-DISABLED-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
@@ -64,11 +75,6 @@
font-size: 12px;
}
/* battery icon */
#panel .power-status.panel-status-indicators-box StIcon {
font-size: 14px;
}
/* panel buttons in lock screen / overview */
#panel.unlock-screen .panel-button,

View File

@@ -2,12 +2,12 @@
/* QS section */
.quick-settings {
padding: 18px;
padding: 15px;
border-radius: 24px;
}
/* screenshot / settings / lock / power options; part of quick-toggle-arrow [44+] */
/* screenshot / settings / lock / power options; part of quick-toggle-arrow [44-47] quick-toggle-menu-button [48+] */
.icon-button {
background-color: ACCENT-DISABLED-COLOR;
color: TEXT-PRIMARY-COLOR;
@@ -29,7 +29,8 @@
/* toggles in QS */
.quick-toggle, /* 43 */
.quick-menu-toggle .quick-toggle { /* 44+ */
.quick-menu-toggle .quick-toggle, /* 44-47 */
.quick-toggle-has-menu .quick-toggle{ /* 48+ */
color: TEXT-PRIMARY-COLOR;
border-radius: 15px;
background-color: ACCENT-DISABLED-COLOR;
@@ -41,40 +42,50 @@
font-weight: 600;
}
/* adjust borders if quick toggle has expandable menu button (quick-toggle-arrow)[44+] */
.quick-menu-toggle .quick-toggle:ltr { border-radius: 15px 0 0 15px; }
.quick-menu-toggle .quick-toggle:rtl { border-radius: 0 15px 15px 0; }
/* adjust borders if quick toggle has expandable menu button (quick-toggle-arrow)44-47] (quick-toggle-menu-button)[48+] */
.quick-menu-toggle .quick-toggle:ltr,
.quick-toggle-has-menu .quick-toggle:ltr { border-radius: 15px 0 0 15px; }
.quick-menu-toggle .quick-toggle:rtl,
.quick-toggle-has-menu .quick-toggle:rtl { border-radius: 0 15px 15px 0; }
/* if quick toggle has no expandable menu button (quick-toggle-arrow)[44+] */
.quick-menu-toggle .quick-toggle:last-child {
.quick-menu-toggle .quick-toggle:last-child,
.quick-toggle-has-menu .quick-toggle:last-child {
border-radius: 15px;
}
.quick-menu-toggle .quick-toggle-arrow {
.quick-menu-toggle .quick-toggle-arrow,
.quick-toggle-has-menu .quick-toggle-menu-button {
border-color: transparent;
}
/* adjust borders in expandable menu button */
.quick-menu-toggle .quick-toggle-arrow:ltr {
.quick-menu-toggle .quick-toggle-arrow:ltr,
.quick-toggle-has-menu .quick-toggle-menu-button:ltr {
border-radius: 0 15px 15px 0;
border-left-width: 2px;
}
.quick-menu-toggle .quick-toggle-arrow:rtl {
.quick-menu-toggle .quick-toggle-arrow:rtl,
.quick-toggle-has-menu .quick-toggle-menu-button:rtl {
border-radius: 15px 0 0 15px;
border-right-width: 2px;
}
.quick-toggle:hover,
.quick-menu-toggle .quick-toggle:hover,
.quick-menu-toggle .quick-toggle-arrow:hover {
.quick-menu-toggle .quick-toggle-arrow:hover,
.quick-toggle-has-menu .quick-toggle:hover,
.quick-toggle-has-menu .quick-toggle-menu-button:hover {
color: TEXT-PRIMARY-COLOR;
background-color: ACCENT-DISABLED_HOVER;
}
.quick-toggle:checked,
.quick-menu-toggle .quick-toggle:checked,
.quick-menu-toggle .quick-toggle-arrow:checked {
.quick-menu-toggle .quick-toggle-arrow:checked,
.quick-toggle-has-menu .quick-toggle:checked,
.quick-toggle-has-menu .quick-toggle-menu-button:checked {
color: BUTTON-TEXT-COLOR;
background-color: BUTTON-COLOR;
border-color: transparent;
@@ -82,7 +93,9 @@
.quick-toggle:checked:hover,
.quick-menu-toggle .quick-toggle:checked:hover,
.quick-menu-toggle .quick-toggle-arrow:checked:hover {
.quick-menu-toggle .quick-toggle-arrow:checked:hover,
.quick-toggle-has-menu .quick-toggle:checked:hover,
.quick-toggle-has-menu .quick-toggle-menu-button:checked:hover{
color: BUTTON-TEXT-COLOR;
background-color: BUTTON_HOVER;
}
@@ -93,7 +106,7 @@
.quick-slider .slider-bin {
padding: 4px;
margin: 0;
color: BUTTON-TEXT-COLOR;
color: BUTTON-TEXT-COLOR; /* up tp 46 */
border-radius: 99px;
}
@@ -179,4 +192,4 @@ https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/beb77f58243265a6cc62b720a5b0
.background-app-item .close-button:hover {
background-color: ACCENT-DISABLED_HOVER;
}
}

View File

@@ -0,0 +1,33 @@
/* if first button: margin-right: 12px/2 */
.modal-dialog-linked-button:ltr:first-child,
.notification-button:ltr:first-child,
.hotplug-notification-item:ltr:first-child,
.modal-dialog-linked-button:rtl:last-child,
.notification-button:rtl:last-child,
.hotplug-notification-item:rtl:last-child {
margin: 0 6px 0 0 !important;
}
/* if last button: margin-left: 12px/2 */
.modal-dialog-linked-button:ltr:last-child,
.notification-button:ltr:last-child,
.hotplug-notification-item:ltr:last-child,
.modal-dialog-linked-button:rtl:first-child,
.notification-button:rtl:first-child,
.hotplug-notification-item:rtl:first-child {
margin: 0 0 0 6px !important;
}
/* if only button: normal margin */
.modal-dialog-linked-button:first-child:last-child,
.notification-button:first-child:last-child,
.hotplug-notification-item:first-child:last-child {
margin: 0 !important;
}
/* else: margin-right/left: 12px/2 */
.modal-dialog-linked-button,
.notification-button,
.hotplug-notification-item {
margin: 0 6px !important;
}

View File

@@ -0,0 +1,15 @@
.toggle-switch {
background-image: url("./toggle-off.svg");
}
.toggle-switch:checked {
background-image: url("./toggle-on.svg");
}
.dnd-button .toggle-switch {
background-image: url("./toggle-off_dnd.svg");
}
.dnd-button .toggle-switch:checked {
background-image: url("./toggle-on_dnd.svg");
}

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,7 @@
.modal-dialog-linked-button {
margin: 0;
}
.notification-buttons-bin {
spacing: 1px;
}

View File

@@ -0,0 +1,19 @@
.toggle-switch .handle {
/* toggle-switch height - handle margin * 2 */
width: 14px;
height: 14px;
margin: 2px;
background-color: TEXT-SECONDARY-COLOR;
}
.toggle-switch:checked .handle {
background-color: BUTTON-TEXT-COLOR;
}
.dnd-button .toggle-switch .handle {
/* toggle-switch height - handle margin * 2 */
width: 16px;
height: 16px;
border-radius: 6px;
margin: 3px;
}