Floating panel tweak; Fixed opaque, panel text color tweaks

- Closes #57;
- Added floating panel tweak. Supports opaque tweak;
- Fixed an issue when opaque tweak does not apply to translucent background;
- Fixed an issue when panel text color tweak does not apply to clock button correctly and defined color does not work in overview. Extracted panel text color tweak to another function;
- Renamed BUTTON-CLOSE-COLOR to ACCENT-DISABLED-OPAQUE-COLOR;
This commit is contained in:
Vladyslav Hroshev
2025-04-19 19:43:01 +03:00
parent 7bdd7584ff
commit 32751ceafb
7 changed files with 74 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
from scripts.install.colors_definer import ColorsDefiner
from scripts.utils.theme.theme import Theme
def define_arguments(parser):
@@ -6,7 +6,10 @@ def define_arguments(parser):
color_args.add_argument('-O', '--opaque', action='store_true', help='make the background in menus/popovers opaque')
def apply_tweak(args, theme, colors: ColorsDefiner):
def apply_tweak(args, theme: Theme, colors):
if args.opaque:
colors.replacers["BACKGROUND-COLOR"]["light"]["a"] = 1
colors.replacers["BACKGROUND-COLOR"]["dark"]["a"] = 1
with open(theme.main_styles, "r") as file:
content = file.read()
with open(theme.main_styles, "w") as file:
replaced_content = content.replace("BACKGROUND-COLOR", "BACKGROUND-OPAQUE-COLOR")
file.write(replaced_content)