mirror of
https://github.com/imarkoff/Marble-shell-theme.git
synced 2025-09-28 14:16:35 -07:00
Fixed opaque tweak, decreased sleep in apply_gnome_theme
This commit is contained in:
@@ -29,7 +29,7 @@ def apply_gnome_theme(theme=None) -> bool:
|
|||||||
formatted_theme = Console.format(theme, color=Color.get(color, Color.GRAY), format_type=Format.BOLD)
|
formatted_theme = Console.format(theme, color=Color.get(color, Color.GRAY), format_type=Format.BOLD)
|
||||||
|
|
||||||
line.update(f"Applying {formatted_theme} theme...")
|
line.update(f"Applying {formatted_theme} theme...")
|
||||||
time.sleep(0.1) # applying the theme may freeze, so we need to wait a bit
|
time.sleep(0.025) # applying the theme may freeze, so we need to wait a bit
|
||||||
apply_user_theme(theme)
|
apply_user_theme(theme)
|
||||||
line.success(f"Theme {formatted_theme} applied.")
|
line.success(f"Theme {formatted_theme} applied.")
|
||||||
except Exception:
|
except Exception:
|
||||||
|
@@ -1,9 +1,12 @@
|
|||||||
|
from scripts.install.colors_definer import ColorsDefiner
|
||||||
|
|
||||||
|
|
||||||
def define_arguments(parser):
|
def define_arguments(parser):
|
||||||
color_args = parser.add_argument_group('Color tweaks')
|
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')
|
color_args.add_argument('-O', '--opaque', action='store_true', help='make the background in menus/popovers opaque')
|
||||||
|
|
||||||
|
|
||||||
def apply_tweak(args, theme, colors):
|
def apply_tweak(args, theme, colors: ColorsDefiner):
|
||||||
if args.opaque:
|
if args.opaque:
|
||||||
colors["elements"]["BACKGROUND-COLOR"]["light"]["a"] = 1
|
colors.replacers["BACKGROUND-COLOR"]["light"]["a"] = 1
|
||||||
colors["elements"]["BACKGROUND-COLOR"]["dark"]["a"] = 1
|
colors.replacers["BACKGROUND-COLOR"]["dark"]["a"] = 1
|
||||||
|
Reference in New Issue
Block a user