2022-04-07 21:03:53 +02:00
|
|
|
from kivy.utils import get_color_from_hex
|
|
|
|
from kivymd.color_definitions import colors
|
|
|
|
from kivy.uix.screenmanager import ScreenManager, Screen
|
|
|
|
from kivymd.theming import ThemableBehavior
|
|
|
|
from kivymd.uix.list import OneLineIconListItem, MDList, IconLeftWidget, IconRightWidget
|
|
|
|
from kivy.properties import StringProperty
|
|
|
|
|
|
|
|
ts_format = "%Y-%m-%d %H:%M:%S"
|
2022-11-22 14:25:56 +01:00
|
|
|
file_ts_format = "%Y_%m_%d_%H_%M_%S"
|
2022-04-07 21:03:53 +02:00
|
|
|
|
|
|
|
def mdc(color, hue=None):
|
|
|
|
if hue == None:
|
|
|
|
hue = "400"
|
|
|
|
return get_color_from_hex(colors[color][hue])
|
|
|
|
|
2022-10-02 22:48:55 +02:00
|
|
|
color_received = "LightGreen"
|
|
|
|
color_delivered = "Blue"
|
2022-11-22 14:25:56 +01:00
|
|
|
color_paper = "Indigo"
|
2022-10-02 22:48:55 +02:00
|
|
|
color_propagated = "Indigo"
|
2022-04-07 21:03:53 +02:00
|
|
|
color_failed = "Red"
|
|
|
|
color_unknown = "Gray"
|
2022-10-02 22:48:55 +02:00
|
|
|
intensity_msgs_dark = "800"
|
2022-10-02 14:51:01 +02:00
|
|
|
intensity_msgs_light = "500"
|
2022-04-07 21:03:53 +02:00
|
|
|
|
|
|
|
class ContentNavigationDrawer(Screen):
|
|
|
|
pass
|
|
|
|
|
|
|
|
class DrawerList(ThemableBehavior, MDList):
|
|
|
|
pass
|
|
|
|
|
|
|
|
class IconListItem(OneLineIconListItem):
|
|
|
|
icon = StringProperty()
|
|
|
|
|