Mercurial > libervia-desktop-kivy
comparison cagou/core/cagou_main.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 | 3f7e227aab00 |
children | a7b80552ca8d |
comparison
equal
deleted
inserted
replaced
285:3f7e227aab00 | 286:4772ba26623f |
---|---|
75 from plyer import notification | 75 from plyer import notification |
76 except ImportError: | 76 except ImportError: |
77 notification = None | 77 notification = None |
78 log.warning(_(u"Can't import plyer, some features disabled")) | 78 log.warning(_(u"Can't import plyer, some features disabled")) |
79 | 79 |
80 | |
81 ## platform specific settings ## | |
82 | |
80 if kivy_utils.platform == "android": | 83 if kivy_utils.platform == "android": |
81 import socket | 84 import socket |
82 | |
83 | 85 |
84 # FIXME: move to separate android module | 86 # FIXME: move to separate android module |
85 # sys.platform is "linux" on android by default | 87 # sys.platform is "linux" on android by default |
86 # so we change it to allow backend to detect android | 88 # so we change it to allow backend to detect android |
87 sys.platform = "android" | 89 sys.platform = "android" |
90 SOCKET_FILE = ".socket" | 92 SOCKET_FILE = ".socket" |
91 STATE_RUNNING = "running" | 93 STATE_RUNNING = "running" |
92 STATE_PAUSED = "paused" | 94 STATE_PAUSED = "paused" |
93 STATE_STOPPED = "stopped" | 95 STATE_STOPPED = "stopped" |
94 | 96 |
97 | |
98 ## General Configuration ## | |
95 | 99 |
96 # we want white background by default | 100 # we want white background by default |
97 Window.clearcolor = (1, 1, 1, 1) | 101 Window.clearcolor = (1, 1, 1, 1) |
98 # we don't want multi-touch emulation with mouse | 102 # we don't want multi-touch emulation with mouse |
99 KivyConfig.set('input', 'mouse', 'mouse,disable_multitouch') | 103 KivyConfig.set('input', 'mouse', 'mouse,disable_multitouch') |