mirror of
https://github.com/imarkoff/Marble-shell-theme.git
synced 2025-09-17 08:47:55 -07:00
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:
@@ -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)
|
Reference in New Issue
Block a user