Files
Marble-shell-theme/tweaks/opaque/tweak.py
Vladyslav Hroshev 32751ceafb 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;
2025-04-19 19:43:01 +03:00

15 lines
592 B
Python
Executable File

from scripts.utils.theme.theme import Theme
def define_arguments(parser):
color_args = parser.add_argument_group('Color tweaks')
color_args.add_argument('-O', '--opaque', action='store_true', help='make the background in menus/popovers opaque')
def apply_tweak(args, theme: Theme, colors):
if args.opaque:
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)