# HG changeset patch # User Goffi # Date 1524905034 -7200 # Node ID 8ed389d156901b03995e96ccf66faa89e406c5e3 # Parent 976f22cb3ecc2857800c44b1360a027febc46795 xmlui: fixes: - removed global ScrollView as it was conflicting with TabbedPanel, resulting in unusable settings - replaced GridLayout by BoxLayout when suitable, as they now handle minimum_height diff -r 976f22cb3ecc -r 8ed389d15690 cagou/core/xmlui.py --- a/cagou/core/xmlui.py Sat Apr 28 08:57:51 2018 +0200 +++ b/cagou/core/xmlui.py Sat Apr 28 10:43:54 2018 +0200 @@ -22,7 +22,6 @@ from sat.core.log import getLogger log = getLogger(__name__) from sat_frontends.tools import xmlui -from kivy.uix.scrollview import ScrollView from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.tabbedpanel import TabbedPanel, TabbedPanelItem @@ -274,11 +273,11 @@ ## Containers ## -class VerticalContainer(xmlui.VerticalContainer, GridLayout): +class VerticalContainer(xmlui.VerticalContainer, BoxLayout): def __init__(self, xmlui_parent): self.xmlui_parent = xmlui_parent - GridLayout.__init__(self) + BoxLayout.__init__(self, orientation="vertical") def _xmluiAppend(self, widget): self.add_widget(widget) @@ -477,18 +476,13 @@ pass -class XMLUIPanelGrid(GridLayout): - pass - -class XMLUIPanel(xmlui.XMLUIPanel, ScrollView): +class XMLUIPanel(xmlui.XMLUIPanel, BoxLayout): widget_factory = WidgetFactory() def __init__(self, host, parsed_xml, title=None, flags=None, callback=None, ignore=None, whitelist=None, profile=C.PROF_KEY_NONE): - ScrollView.__init__(self) + BoxLayout.__init__(self, orientation="vertical") self.close_cb = None - self._grid = XMLUIPanelGrid() self._post_treats = [] # list of callback to call after UI is constructed - ScrollView.add_widget(self, self._grid) xmlui.XMLUIPanel.__init__(self, host, parsed_xml, @@ -499,9 +493,6 @@ whitelist=whitelist, profile=profile) - def add_widget(self, wid): - self._grid.add_widget(wid) - def setCloseCb(self, close_cb): self.close_cb = close_cb diff -r 976f22cb3ecc -r 8ed389d15690 cagou/kv/xmlui.kv --- a/cagou/kv/xmlui.kv Sat Apr 28 08:57:51 2018 +0200 +++ b/cagou/kv/xmlui.kv Sat Apr 28 10:43:54 2018 +0200 @@ -78,7 +78,6 @@ : - cols: 1 size_hint: 1, None height: self.minimum_height @@ -91,8 +90,6 @@ : size_hint: 1, None - height: 100 - : size_hint: 1, None @@ -129,9 +126,3 @@ Rectangle: pos: self.pos size: self.size - - -: - cols: 1 - size_hint: 1, None - height: self.minimum_height