Mercurial > libervia-desktop-kivy
comparison cagou/plugins/plugin_wid_settings.py @ 286:4772ba26623f
xmlui: many improvments:
- use a white background to be coherent with the rest of the UI
- cancel button is added on "window" XMLUIs
- use color for submit/save buttons
- VerticalContainer is not a ScrollView anymore, XMLUIPanel now has the main ScrollView
- when a TabsContainer is used as main container, main XMLUIPanel ScrollView touch events are disabled, to improve user experience (Kivy doesn't support well ScrollView inside an other ScrollView)
- use BoxLayout instead of GridLayout in AdvancedList*, as they use one row/col only
- fixed DividerWidget line location
- added margins in XMLUI panels
- renamed Settings main class to CagouSettings, to avoid conflict with Kivy's Settings class (which is causing troubles with kv)
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 27 Mar 2019 22:22:51 +0100 |
parents | 1b835bcfa663 |
children | 772c170b47a9 |
comparison
equal
deleted
inserted
replaced
285:3f7e227aab00 | 286:4772ba26623f |
---|---|
29 from cagou import G | 29 from cagou import G |
30 | 30 |
31 | 31 |
32 PLUGIN_INFO = { | 32 PLUGIN_INFO = { |
33 "name": _(u"settings"), | 33 "name": _(u"settings"), |
34 "main": "Settings", | 34 "main": "CagouSettings", |
35 "description": _(u"Cagou/SàT settings"), | 35 "description": _(u"Cagou/SàT settings"), |
36 "icon_symbol": u"wrench", | 36 "icon_symbol": u"wrench", |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 class Settings(quick_widgets.QuickWidget, cagou_widget.CagouWidget): | 40 class CagouSettings(quick_widgets.QuickWidget, cagou_widget.CagouWidget): |
41 # XXX: this class can't be called "Settings", because Kivy has already a class | |
42 # of this name, and the kv there would apply | |
41 | 43 |
42 def __init__(self, host, target, profiles): | 44 def __init__(self, host, target, profiles): |
43 quick_widgets.QuickWidget.__init__(self, G.host, target, profiles) | 45 quick_widgets.QuickWidget.__init__(self, G.host, target, profiles) |
44 cagou_widget.CagouWidget.__init__(self) | 46 cagou_widget.CagouWidget.__init__(self) |
45 # the Widget() avoid CagouWidget header to be down at the beginning | 47 # the Widget() avoid CagouWidget header to be down at the beginning |