# HG changeset patch # User Goffi # Date 1582392849 -3600 # Node ID b018386653c27839193eb0940ca0e1498c39ad6b # Parent 2a58f3d756ad67609899b15e3f891619f77df8c2 chat: work around ScrollView bug in attachments by using a StackLayout instead: cf. https://github.com/kivy/kivy/issues/6745 diff -r 2a58f3d756ad -r b018386653c2 cagou/plugins/plugin_wid_chat.kv --- a/cagou/plugins/plugin_wid_chat.kv Sat Feb 22 18:28:47 2020 +0100 +++ b/cagou/plugins/plugin_wid_chat.kv Sat Feb 22 18:34:09 2020 +0100 @@ -27,8 +27,8 @@ : - size_hint: None, 1 - width: dp(100) + size_hint: None, None + size: self.minimum_width, dp(50) SymbolLabel: symbol: root.get_symbol(root.data) text: root.data.get('name', '') @@ -37,13 +37,9 @@ : - attachments: attachments + attachments: self size_hint: 1, None - height: dp(50) - BoxLayout: - id: attachments - size_hint: None, 1 - width: self.minimum_width + height: self.minimum_height : diff -r 2a58f3d756ad -r b018386653c2 cagou/plugins/plugin_wid_chat.py --- a/cagou/plugins/plugin_wid_chat.py Sat Feb 22 18:28:47 2020 +0100 +++ b/cagou/plugins/plugin_wid_chat.py Sat Feb 22 18:34:09 2020 +0100 @@ -28,7 +28,7 @@ from kivy.metrics import sp, dp from kivy.clock import Clock from kivy import properties -from kivy.uix.scrollview import ScrollView +from kivy.uix.stacklayout import StackLayout from kivy.uix.dropdown import DropDown from kivy.core.window import Window from sat.core import log as logging @@ -77,7 +77,9 @@ INFINITE_SCROLL_LIMIT = dp(600) -class AttachmentsLayout(ScrollView): +# FIXME: a ScrollLayout was supposed to be used here, but due +# to https://github.com/kivy/kivy/issues/6745, a StackLayout is used for now +class AttachmentsLayout(StackLayout): attachments = properties.ObjectProperty()