Mercurial > libervia-desktop-kivy
diff src/cagou/core/profile_manager.py @ 62:1922506846be
design fixes:
- adjust sizes using sp/dp so it adapts on different screen resolutions
- use a shorter sentence for profile manager label, so it appears better on small screens
- various design adjustment to appear correclty on different screen size
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 04 Dec 2016 21:34:30 +0100 |
parents | 817a45e6d7e3 |
children | af4f986d86f0 |
line wrap: on
line diff
--- a/src/cagou/core/profile_manager.py Sun Dec 04 18:21:23 2016 +0100 +++ b/src/cagou/core/profile_manager.py Sun Dec 04 21:34:30 2016 +0100 @@ -27,6 +27,7 @@ from kivy.uix.button import Button from kivy.uix.screenmanager import ScreenManager, Screen from kivy.adapters import listadapter +from kivy.metrics import sp from kivy import properties from cagou import G @@ -136,6 +137,7 @@ self.list_adapter = ProfileListAdapter(pm, data=profiles, cls=ProfileItem, + args_converter=self.converter, selection_mode='multiple', allow_empty_selection=True, ) @@ -144,6 +146,11 @@ connect_btn = ConnectButton(self) self.layout.add_widget(connect_btn) + def converter(self, row_idx, obj): + return {'text': obj, + 'size_hint_y': None, + 'height': sp(40)} + def reload(self): """Reload profiles list""" profiles = G.host.bridge.getProfilesList()