2025-04-05 11:46:24 -05:00
|
|
|
<LauncherCard>:
|
|
|
|
id: main
|
|
|
|
style: "filled"
|
|
|
|
padding: "4dp"
|
|
|
|
size_hint: 1, None
|
|
|
|
height: "75dp"
|
|
|
|
context_button: context
|
2025-04-15 17:09:27 -05:00
|
|
|
focus_behavior: False
|
2025-04-05 11:46:24 -05:00
|
|
|
|
|
|
|
MDRelativeLayout:
|
|
|
|
ApAsyncImage:
|
|
|
|
source: main.image
|
2025-04-06 13:11:16 -05:00
|
|
|
size: (48, 48)
|
2025-04-15 17:09:27 -05:00
|
|
|
size_hint: None, None
|
2025-04-05 11:46:24 -05:00
|
|
|
pos_hint: {"center_x": 0.1, "center_y": 0.5}
|
|
|
|
|
|
|
|
MDLabel:
|
|
|
|
text: main.component.display_name
|
2025-04-06 13:11:16 -05:00
|
|
|
pos_hint:{"center_x": 0.5, "center_y": 0.75 if main.component.description else 0.65}
|
2025-04-05 11:46:24 -05:00
|
|
|
halign: "center"
|
|
|
|
font_style: "Title"
|
|
|
|
role: "medium"
|
|
|
|
theme_text_color: "Custom"
|
|
|
|
text_color: app.theme_cls.primaryColor
|
|
|
|
|
|
|
|
MDLabel:
|
|
|
|
text: main.component.description
|
|
|
|
pos_hint: {"center_x": 0.5, "center_y": 0.35}
|
|
|
|
halign: "center"
|
|
|
|
role: "small"
|
|
|
|
theme_text_color: "Custom"
|
|
|
|
text_color: app.theme_cls.primaryColor
|
|
|
|
|
|
|
|
MDIconButton:
|
|
|
|
component: main.component
|
|
|
|
icon: "star" if self.component.display_name in app.favorites else "star-outline"
|
|
|
|
style: "standard"
|
|
|
|
pos_hint:{"center_x": 0.85, "center_y": 0.8}
|
|
|
|
theme_text_color: "Custom"
|
|
|
|
text_color: app.theme_cls.primaryColor
|
2025-04-15 17:09:27 -05:00
|
|
|
detect_visible: False
|
2025-04-05 11:46:24 -05:00
|
|
|
on_release: app.set_favorite(self)
|
|
|
|
|
|
|
|
MDIconButton:
|
|
|
|
id: context
|
|
|
|
icon: "menu"
|
|
|
|
style: "standard"
|
|
|
|
pos_hint:{"center_x": 0.95, "center_y": 0.8}
|
|
|
|
theme_text_color: "Custom"
|
|
|
|
text_color: app.theme_cls.primaryColor
|
2025-04-15 17:09:27 -05:00
|
|
|
detect_visible: False
|
2025-04-05 11:46:24 -05:00
|
|
|
|
|
|
|
MDButton:
|
|
|
|
pos_hint:{"center_x": 0.9, "center_y": 0.25}
|
|
|
|
size_hint_y: None
|
|
|
|
height: "25dp"
|
|
|
|
component: main.component
|
|
|
|
on_release: app.component_action(self)
|
2025-04-15 17:09:27 -05:00
|
|
|
detect_visible: False
|
2025-04-05 11:46:24 -05:00
|
|
|
MDButtonText:
|
|
|
|
text: "Open"
|
|
|
|
|
|
|
|
|
|
|
|
#:import Type worlds.LauncherComponents.Type
|
|
|
|
MDFloatLayout:
|
|
|
|
id: top_screen
|
|
|
|
|
|
|
|
MDGridLayout:
|
|
|
|
id: grid
|
|
|
|
cols: 2
|
|
|
|
spacing: "5dp"
|
|
|
|
padding: "10dp"
|
|
|
|
|
|
|
|
MDGridLayout:
|
|
|
|
id: navigation
|
|
|
|
cols: 1
|
|
|
|
size_hint_x: 0.25
|
|
|
|
|
|
|
|
MDButton:
|
|
|
|
id: all
|
|
|
|
style: "text"
|
|
|
|
type: (Type.CLIENT, Type.TOOL, Type.ADJUSTER, Type.MISC)
|
2025-04-19 17:27:03 -04:00
|
|
|
on_release: app.filter_clients_by_type(self)
|
2025-04-05 11:46:24 -05:00
|
|
|
|
|
|
|
MDButtonIcon:
|
|
|
|
icon: "asterisk"
|
|
|
|
MDButtonText:
|
|
|
|
text: "All"
|
|
|
|
MDButton:
|
|
|
|
id: client
|
|
|
|
style: "text"
|
|
|
|
type: (Type.CLIENT, )
|
2025-04-19 17:27:03 -04:00
|
|
|
on_release: app.filter_clients_by_type(self)
|
2025-04-05 11:46:24 -05:00
|
|
|
|
|
|
|
MDButtonIcon:
|
|
|
|
icon: "controller"
|
|
|
|
MDButtonText:
|
|
|
|
text: "Client"
|
|
|
|
MDButton:
|
|
|
|
id: Tool
|
|
|
|
style: "text"
|
|
|
|
type: (Type.TOOL, )
|
2025-04-19 17:27:03 -04:00
|
|
|
on_release: app.filter_clients_by_type(self)
|
2025-04-05 11:46:24 -05:00
|
|
|
|
|
|
|
MDButtonIcon:
|
|
|
|
icon: "desktop-classic"
|
|
|
|
MDButtonText:
|
|
|
|
text: "Tool"
|
|
|
|
MDButton:
|
|
|
|
id: adjuster
|
|
|
|
style: "text"
|
|
|
|
type: (Type.ADJUSTER, )
|
2025-04-19 17:27:03 -04:00
|
|
|
on_release: app.filter_clients_by_type(self)
|
2025-04-05 11:46:24 -05:00
|
|
|
|
|
|
|
MDButtonIcon:
|
|
|
|
icon: "wrench"
|
|
|
|
MDButtonText:
|
|
|
|
text: "Adjuster"
|
|
|
|
MDButton:
|
|
|
|
id: misc
|
|
|
|
style: "text"
|
|
|
|
type: (Type.MISC, )
|
2025-04-19 17:27:03 -04:00
|
|
|
on_release: app.filter_clients_by_type(self)
|
2025-04-05 11:46:24 -05:00
|
|
|
|
|
|
|
MDButtonIcon:
|
|
|
|
icon: "dots-horizontal-circle-outline"
|
|
|
|
MDButtonText:
|
|
|
|
text: "Misc"
|
|
|
|
|
|
|
|
MDButton:
|
|
|
|
id: favorites
|
|
|
|
style: "text"
|
|
|
|
type: ("favorites", )
|
2025-04-19 17:27:03 -04:00
|
|
|
on_release: app.filter_clients_by_type(self)
|
2025-04-05 11:46:24 -05:00
|
|
|
|
|
|
|
MDButtonIcon:
|
|
|
|
icon: "star"
|
|
|
|
MDButtonText:
|
|
|
|
text: "Favorites"
|
|
|
|
|
|
|
|
MDNavigationDrawerDivider:
|
|
|
|
|
|
|
|
|
2025-04-19 17:27:03 -04:00
|
|
|
MDGridLayout:
|
|
|
|
id: main_layout
|
|
|
|
cols: 1
|
|
|
|
spacing: "10dp"
|
|
|
|
|
|
|
|
MDTextField:
|
|
|
|
id: search_box
|
|
|
|
mode: "outlined"
|
|
|
|
set_text: app.filter_clients_by_name
|
|
|
|
|
|
|
|
MDTextFieldLeadingIcon:
|
|
|
|
icon: "magnify"
|
|
|
|
|
|
|
|
MDTextFieldHintText:
|
|
|
|
text: "Search"
|
|
|
|
|
|
|
|
ScrollBox:
|
|
|
|
id: button_layout
|