mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Core: post-KivyMD cleanup (#4815)
* 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
This commit is contained in:
6
kvui.py
6
kvui.py
@@ -93,13 +93,13 @@ class ThemedApp(MDApp):
|
||||
self.theme_cls.theme_style = getattr(text_colors, "theme_style", "Dark")
|
||||
self.theme_cls.primary_palette = getattr(text_colors, "primary_palette", "Green")
|
||||
self.theme_cls.dynamic_scheme_name = getattr(text_colors, "dynamic_scheme_name", "TONAL_SPOT")
|
||||
self.theme_cls.dynamic_scheme_contrast = 0.0
|
||||
self.theme_cls.dynamic_scheme_contrast = getattr(text_colors, "dynamic_scheme_contrast", 0.0)
|
||||
|
||||
|
||||
class ImageIcon(MDButtonIcon, AsyncImage):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(args, kwargs)
|
||||
self.image = AsyncImage(**kwargs)
|
||||
self.image = ApAsyncImage(**kwargs)
|
||||
self.add_widget(self.image)
|
||||
|
||||
def add_widget(self, widget, index=0, canvas=None):
|
||||
@@ -114,7 +114,7 @@ class ImageButton(MDIconButton):
|
||||
if val != "None":
|
||||
image_args[kwarg.replace("image_", "")] = val
|
||||
super().__init__()
|
||||
self.image = AsyncImage(**image_args)
|
||||
self.image = ApAsyncImage(**image_args)
|
||||
|
||||
def set_center(button, center):
|
||||
self.image.center_x = self.center_x
|
||||
|
Reference in New Issue
Block a user