-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: KivyMD and Launcher overhaul #3934
base: main
Are you sure you want to change the base?
Conversation
with the removal of the broken code and some more futzing I got parity with pre-md working, thanks <3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI #2779 when handling the player picking between text client and a game client seems broken with this branch (the automatically launching text client seems to work without issue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubled the movement on each scroll wheel tick, but we can probably adjust that one to taste with a proper beta version. The "not scrolling by click and drag" was intentional because of some weirdness with it, but I think this is more an issue of the base KivyMD scroll effect. Gonna mess with it some and see if I can't just swap in the base Kivy version.
Fixed, to the point we don't even need the |
code and functionality looks good on first blush, will test a bit more extensively later |
FYI the imageloader stuff in #3629 does require use of the ApAsyncImage class in kvui instead of AsyncImage directly, else it should be plug and play |
def set_height(self, instance, value): | ||
def set_height(self, _, _2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Python, using underscores for unused function parameter names is not good practice.
It's good for local variables, but not for function parameters.
In Python (different from some other languages), the parameter names are an important part of the function signature.
If this is an override or if it's implementing some interface, and the interface is defined as:
def set_height(self, instance, value):
...
That means that someone could call an implementor of that interface with:
x.set_height(instance=foo, value=bar)
And that would crash with this override, because it doesn't see those parameter names.
If a linter is complaining about these unused parameters, it shouldn't,
because it can't know whether you're implementing some structural interface that requires the parameters (with certain names) to be there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all my previous comments were addressed and noticed no new issues in using the UI
What is this fixing or adding?
Shifts the contents of
kvui.py
, and thus all CommonClient-based clients as well as Launcher, to using KivyMD. KivyMD is an extension for Kivy that is almost fully compatible with pre-existing Kivy components, while providing Material Design support for theming and overall visual design as well as useful pre-existing built in components such as Snackbars, Tooltips, and a built-in File Manager (not currently being used).As a part of this shift, the launcher was completely overhauled, adding the ability to filter the list of components down to each type of component, the ability to define favorite components and filter to them, and add shortcuts for launcher components to the desktop. An optional description field was added to Component for display within the new launcher.
The theme (Light/Dark) and primary palette have also been exposed to users via client/user.kv.
How was this tested?
Manually, across the span of numerous unsupported games. I'm considering putting out a pre-release version for wider testing as well.
The Launcher changes were tested manually, both in a frozen build and on source.
If this makes graphical changes, please attach screenshots.
Launcher - Dark/Green
Launcher - Light/Lavenderblush
Launcher - Dark/Violet
Text Client - Dark/Red
Text Client - Dark/Cyan