mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-21 06:04:12 -04:00
Restructured repository
This commit is contained in:
parent
46269dd82b
commit
0de4c12c17
274 changed files with 51617 additions and 45 deletions
30
sbapp/ui/helpers.py
Normal file
30
sbapp/ui/helpers.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
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"
|
||||
|
||||
def mdc(color, hue=None):
|
||||
if hue == None:
|
||||
hue = "400"
|
||||
return get_color_from_hex(colors[color][hue])
|
||||
|
||||
color_received = "Green"
|
||||
color_delivered = "Indigo"
|
||||
color_propagated = "Blue"
|
||||
color_failed = "Red"
|
||||
color_unknown = "Gray"
|
||||
intensity_msgs = "600"
|
||||
|
||||
class ContentNavigationDrawer(Screen):
|
||||
pass
|
||||
|
||||
class DrawerList(ThemableBehavior, MDList):
|
||||
pass
|
||||
|
||||
class IconListItem(OneLineIconListItem):
|
||||
icon = StringProperty()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue