ae.kivy_user_prefs
user preferences widgets for your kivy app
this namespace portion is providing a set of widgets to allow the users of your app to change their personal app states/settings/preferences, like the theme, the font size, the language and the used colors.
to use it in your app, import this module, which can be done either in one of the modules of your app via:
import ae.kivy_user_prefs
alternatively, and when you use the Kivy framework for your app, you can import it within your main KV file, like this:
#: import _any_dummy_name ae.kivy_user_prefs
Note
the i18n translation texts of this namespace portion are provided mainly by the portion ae.i18n, registered
on import of it, and the color names by ae.gui.utils. so when you import this portion from the main KV file
of your app, and your app is overwriting a translation text of this portion, then you have to make sure
that the translation texts of your main app get registered after the import of this portion. For that reason
MainAppBase is using the on_app_build event to load the application resources,
which gets fired after Kivy has imported the main KV file.
the user preferences are implemented as a FlowDropDown via the widget UserPreferencesPopup.
to integrate it in your app, you simply add the UserPreferencesButton widget to the main KV file of your app.
user preferences debug mode
the user preferences are activating a debug mode when you click/touch the UserPreferencesButton button more than three times within 6 seconds.
this debug mode activation is implemented in the on_user_preferences_open() event
handler method declared in the ae.kivy.apps module. it can be disabled for your app by simply overriding this
method with an empty method in your main app class.
Classes
|
button widget created for each color. |
|
menu popup for the app themes with dynamic menu items for each theme. |
- class ChangeColorButton(**kwargs)[source]
Bases:
FlowButtonbutton widget created for each color.
- color_name
name of the color to change
- class ThemesMenuPopup(**kwargs)[source]
Bases:
FlowDropDownmenu popup for the app themes with dynamic menu items for each theme.