From 58751bb0e575883274144c7b90438e7b4a6b6e85 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 11 Mar 2024 01:21:54 +0100 Subject: [PATCH] Updated drop-down menu colors --- sbapp/main.py | 11 +++++++++++ sbapp/ui/announces.py | 1 + sbapp/ui/conversations.py | 1 + sbapp/ui/messages.py | 2 ++ 4 files changed, 15 insertions(+) diff --git a/sbapp/main.py b/sbapp/main.py index 0bab658..7735a0c 100644 --- a/sbapp/main.py +++ b/sbapp/main.py @@ -391,9 +391,17 @@ class SidebandApp(MDApp): if self.sideband.config["dark_ui"]: self.color_reject = colors["DeepOrange"]["900"] self.color_accept = colors["LightGreen"]["700"] + if not self.sideband.config["eink_mode"]: + self.color_hover = colors["Dark"]["CardsDialogs"] + else: + self.color_hover = colors["Gray"]["800"] else: self.color_reject = colors["DeepOrange"]["800"] self.color_accept = colors["LightGreen"]["700"] + if not self.sideband.config["eink_mode"]: + self.color_hover = colors["Light"]["CardsDialogs"] + else: + self.color_hover = colors["Light"]["AppBar"] self.apply_eink_mods() @@ -1229,6 +1237,9 @@ class SidebandApp(MDApp): self.update_message_widgets() + def message_attachment_action(self, sender): + pass + def update_message_widgets(self): toolbar_items = self.messages_view.ids.messages_toolbar.ids.right_actions.children mode_item = toolbar_items[1] diff --git a/sbapp/ui/announces.py b/sbapp/ui/announces.py index d7de0fd..bd620d5 100644 --- a/sbapp/ui/announces.py +++ b/sbapp/ui/announces.py @@ -242,6 +242,7 @@ class Announces(): elevation=0, radius=dp(3), ) + item.dmenu.md_bg_color = self.app.color_hover def callback_factory(ref): def x(sender): diff --git a/sbapp/ui/conversations.py b/sbapp/ui/conversations.py index 58bc101..6f7f207 100644 --- a/sbapp/ui/conversations.py +++ b/sbapp/ui/conversations.py @@ -378,6 +378,7 @@ class Conversations(): radius=dp(3), ) self.conversation_dropdown.effect_cls = ScrollEffect + self.conversation_dropdown.md_bg_color = self.app.color_hover item.dmenu = self.conversation_dropdown diff --git a/sbapp/ui/messages.py b/sbapp/ui/messages.py index 2270c76..7f05497 100644 --- a/sbapp/ui/messages.py +++ b/sbapp/ui/messages.py @@ -679,6 +679,7 @@ class Messages(): elevation=0, radius=dp(3), ) + item.dmenu.md_bg_color = self.app.color_hover item.dmenu.retry_item = retry_item def callback_factory(ref): @@ -730,6 +731,7 @@ MDScreen: [['menu', lambda x: root.app.nav_drawer.set_state("open")],] right_action_items: [ + ['attachment-plus', lambda x: root.app.message_attachment_action(self)], ['map-marker-path', lambda x: root.app.peer_show_telemetry_action(self)], ['map-search', lambda x: root.app.peer_show_location_action(self)], ['lan-connect', lambda x: root.app.message_propagation_action(self)],