 dc4e8bae98
			
		
	
	dc4e8bae98
	
	
	
		
			
			* Removed now unused imports from Launcher * Moved ImageIcon and ImageButton to use ApAsyncImage for compatibility with apworlds * Adjusted image size in the Launcher from 40x40 to 48x48. This is already larger than the size in previous versions, and a docs update is soon to follow. * Expose `dynamic_scheme_contrast` to user.kv, allowing users to set high contrast. * ScrollBox's default scroll_type was set to only content, so the scrollbar in Launcher was nonfunctional. * Adjusted the spacing of the title of a component when a description is present to be closer to the center. * Launcher now scrolls to the top automatically when changing between filters
		
			
				
	
	
		
			142 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			142 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| <LauncherCard>:
 | |
|     id: main
 | |
|     style: "filled"
 | |
|     padding: "4dp"
 | |
|     size_hint: 1, None
 | |
|     height: "75dp"
 | |
|     context_button: context
 | |
| 
 | |
|     MDRelativeLayout:
 | |
|         ApAsyncImage:
 | |
|             source: main.image
 | |
|             size: (48, 48)
 | |
|             size_hint_y: None
 | |
|             pos_hint: {"center_x": 0.1, "center_y": 0.5}
 | |
| 
 | |
|         MDLabel:
 | |
|             text: main.component.display_name
 | |
|             pos_hint:{"center_x": 0.5, "center_y": 0.75 if main.component.description else 0.65}
 | |
|             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
 | |
|             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
 | |
| 
 | |
|         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)
 | |
| 
 | |
|             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)
 | |
|                 on_release: app.filter_clients(self)
 | |
| 
 | |
|                 MDButtonIcon:
 | |
|                     icon: "asterisk"
 | |
|                 MDButtonText:
 | |
|                     text: "All"
 | |
|             MDButton:
 | |
|                 id: client
 | |
|                 style: "text"
 | |
|                 type: (Type.CLIENT, )
 | |
|                 on_release: app.filter_clients(self)
 | |
| 
 | |
|                 MDButtonIcon:
 | |
|                     icon: "controller"
 | |
|                 MDButtonText:
 | |
|                     text: "Client"
 | |
|             MDButton:
 | |
|                 id: Tool
 | |
|                 style: "text"
 | |
|                 type: (Type.TOOL, )
 | |
|                 on_release: app.filter_clients(self)
 | |
| 
 | |
|                 MDButtonIcon:
 | |
|                     icon: "desktop-classic"
 | |
|                 MDButtonText:
 | |
|                     text: "Tool"
 | |
|             MDButton:
 | |
|                 id: adjuster
 | |
|                 style: "text"
 | |
|                 type: (Type.ADJUSTER, )
 | |
|                 on_release: app.filter_clients(self)
 | |
| 
 | |
|                 MDButtonIcon:
 | |
|                     icon: "wrench"
 | |
|                 MDButtonText:
 | |
|                     text: "Adjuster"
 | |
|             MDButton:
 | |
|                 id: misc
 | |
|                 style: "text"
 | |
|                 type: (Type.MISC, )
 | |
|                 on_release: app.filter_clients(self)
 | |
| 
 | |
|                 MDButtonIcon:
 | |
|                     icon: "dots-horizontal-circle-outline"
 | |
|                 MDButtonText:
 | |
|                     text: "Misc"
 | |
| 
 | |
|             MDButton:
 | |
|                 id: favorites
 | |
|                 style: "text"
 | |
|                 type: ("favorites", )
 | |
|                 on_release: app.filter_clients(self)
 | |
| 
 | |
|                 MDButtonIcon:
 | |
|                     icon: "star"
 | |
|                 MDButtonText:
 | |
|                     text: "Favorites"
 | |
| 
 | |
|             MDNavigationDrawerDivider:
 | |
| 
 | |
| 
 | |
|         ScrollBox:
 | |
|             id: button_layout |