From a7fe259c26802587cfe03d9b1558568ab0d0f8c0 Mon Sep 17 00:00:00 2001 From: Silvris <58583688+Silvris@users.noreply.github.com> Date: Thu, 12 Sep 2024 23:29:02 -0500 Subject: [PATCH] actually make launcher reflect color --- Launcher.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Launcher.py b/Launcher.py index 7c7b96873270..71837f8136dd 100644 --- a/Launcher.py +++ b/Launcher.py @@ -375,13 +375,12 @@ def open_menu(caller): self.button_layout.layout.add_widget(build_card(component)) def build(self): - self.theme_cls.theme_style = "Dark" - self.theme_cls.primary_palette = "Green" + from kvui import KivyJSONtoTextParser + text_colors = KivyJSONtoTextParser.TextColors() + self.theme_cls.theme_style = getattr(text_colors, "theme_style", "Dark") + self.theme_cls.primary_palette = getattr(text_colors, "primary_palette", "Green") self.top_screen = MDFloatLayout() self.top_screen.md_bg_color = self.theme_cls.backgroundColor - #drawer_button = MDIconButton(icon="menu", theme_text_color="Custom", text_color=self.theme_cls.primaryColor) - #drawer_button.pos_hint = {"center_x": 0.05, "center_y": 0.95} - #self.screen.add_widget(drawer_button) self.grid = MDGridLayout(cols=2) self.navigation = MDGridLayout(cols=1, size_hint_x=0.25, width=dp(50)) self.top_screen.add_widget(self.grid) @@ -394,12 +393,7 @@ def build(self): self.grid.spacing = 5 self._refresh_components() - # handle navigation drawer - #menu = MDNavigationDrawerMenu(MDNavigationDrawerLabel(text="Components")) - #self.drawer = MDNavigationDrawer(menu, radius=(0, dp(16), dp(16), 0), drawer_type="modal") - - #drawer_button.bind(on_release=toggle_drawer) - #self.drawer.menu = menu + # handle menu menu_icons = { "Client": "controller", "Tool": "desktop-classic",