mirror of
https://github.com/imarkoff/Marble-shell-theme.git
synced 2025-09-16 08:18:41 -07:00
- 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;
15 lines
592 B
Python
Executable File
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) |