Mercurial > libervia-desktop-kivy
comparison cagou/plugins/plugin_wid_chat.py @ 411:b018386653c2
chat: work around ScrollView bug in attachments by using a StackLayout instead:
cf. https://github.com/kivy/kivy/issues/6745
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 22 Feb 2020 18:34:09 +0100 |
parents | 2caea63ae2ab |
children | 7c6149c249c1 |
comparison
equal
deleted
inserted
replaced
410:2a58f3d756ad | 411:b018386653c2 |
---|---|
26 from kivy.uix import screenmanager | 26 from kivy.uix import screenmanager |
27 from kivy.uix.behaviors import ButtonBehavior | 27 from kivy.uix.behaviors import ButtonBehavior |
28 from kivy.metrics import sp, dp | 28 from kivy.metrics import sp, dp |
29 from kivy.clock import Clock | 29 from kivy.clock import Clock |
30 from kivy import properties | 30 from kivy import properties |
31 from kivy.uix.scrollview import ScrollView | 31 from kivy.uix.stacklayout import StackLayout |
32 from kivy.uix.dropdown import DropDown | 32 from kivy.uix.dropdown import DropDown |
33 from kivy.core.window import Window | 33 from kivy.core.window import Window |
34 from sat.core import log as logging | 34 from sat.core import log as logging |
35 from sat.core.i18n import _ | 35 from sat.core.i18n import _ |
36 from sat.core import exceptions | 36 from sat.core import exceptions |
75 | 75 |
76 # below this limit, new messages will be prepended | 76 # below this limit, new messages will be prepended |
77 INFINITE_SCROLL_LIMIT = dp(600) | 77 INFINITE_SCROLL_LIMIT = dp(600) |
78 | 78 |
79 | 79 |
80 class AttachmentsLayout(ScrollView): | 80 # FIXME: a ScrollLayout was supposed to be used here, but due |
81 # to https://github.com/kivy/kivy/issues/6745, a StackLayout is used for now | |
82 class AttachmentsLayout(StackLayout): | |
81 attachments = properties.ObjectProperty() | 83 attachments = properties.ObjectProperty() |
82 | 84 |
83 | 85 |
84 class AttachmentItem(BoxLayout): | 86 class AttachmentItem(BoxLayout): |
85 data = properties.DictProperty() | 87 data = properties.DictProperty() |