diff cagou/core/constants.py @ 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 e2b51663d8b8
children 4d660b252487
line wrap: on
line diff
--- a/cagou/core/constants.py	Fri Dec 06 13:23:03 2019 +0100
+++ b/cagou/core/constants.py	Fri Dec 06 13:25:31 2019 +0100
@@ -52,3 +52,7 @@
     COLOR_ERROR = (1.0, 0.0, 0.0, 1)
 
     COLOR_BTN_LIGHT = (0.4, 0.4, 0.4, 1)
+
+    # values are in dp
+    IMG_MAX_WIDTH = 500
+    IMG_MAX_HEIGHT = 500