Mercurial > libervia-desktop-kivy
comparison cagou/kv/simple_xhtml.kv @ 325:5868a5575e01
chat: cleaning + some improvments:
- code cleaning, removed some dead code
- some improvments on the way size is calculated, removed unnecessary sizing methods which
were linked to properties
- image have now a max size, this avoid gigantic image in the whole screen
- in SimpleXHTMLWidget, Label are now splitted when xhtml is set
- use a DelayedBoxLayout for messages, as they are really slow to be resized
- use of RecycleView has been investigated, but it is not currently usable as dynamic
contents are not propertly handled (see https://github.com/kivy/kivy/issues/6580 and
https://github.com/kivy/kivy/issues/6582). Furthermore, some tests with RecycleView on
Android don't give the expected speed boost, so BoxLayout still seems like the way to go
for the moment. To be re-investigated at a later point if necessary.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 06 Dec 2019 13:25:31 +0100 |
parents | 1b835bcfa663 |
children | 2caea63ae2ab |
comparison
equal
deleted
inserted
replaced
324:4374cb741eb5 | 325:5868a5575e01 |
---|---|
12 # GNU Affero General Public License for more details. | 12 # GNU Affero General Public License for more details. |
13 | 13 |
14 # You should have received a copy of the GNU Affero General Public License | 14 # You should have received a copy of the GNU Affero General Public License |
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 |
17 #:import C cagou.core.constants.Const | |
18 | |
19 | |
20 <SimpleXHTMLWidget>: | |
21 size_hint: 1, None | |
22 height: self.minimum_height | |
17 | 23 |
18 <SimpleXHTMLWidgetEscapedText>: | 24 <SimpleXHTMLWidgetEscapedText>: |
19 size_hint: None, None | 25 size_hint: 1, None |
20 size: self.texture_size | 26 text_size: self.width, None |
27 height: self.texture_size[1] | |
21 | 28 |
22 <SimpleXHTMLWidgetText>: | 29 <SimpleXHTMLWidgetText>: |
23 size_hint: None, None | 30 size_hint: None, None |
24 size: self.texture_size | 31 size: self.texture_size |
25 | 32 |