diff cagou/plugins/plugin_wid_chat.kv @ 426:d3a6ae859556

chat: image attachments collection, first draft: when more than one image is attached in a message, they are collected and a dedicated attachment item is shown. Opening this item will launch the carousel with all collected images.
author Goffi <goffi@goffi.org>
date Wed, 26 Feb 2020 22:07:15 +0100
parents 13884aac1220
children aa204c813f07
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.kv	Wed Feb 26 16:47:39 2020 +0100
+++ b/cagou/plugins/plugin_wid_chat.kv	Wed Feb 26 22:07:15 2020 +0100
@@ -67,6 +67,25 @@
         anim_delay: -1
 
 
+<AttachmentImagesCollectionItem>:
+    cols: 2
+    size_hint: None, None
+    size: dp(150), dp(150)
+    padding: dp(5)
+    spacing: dp(2)
+    canvas.before:
+        Color:
+            rgb: app.c_prim
+        RoundedRectangle:
+            radius: [dp(5)]
+            pos: self.pos
+            size: self.size
+        Color:
+            rgb: 0, 0, 0, 1
+        Line:
+            rounded_rectangle: self.x, self.y, self.width, self.height, dp(5)
+
+
 <AttachmentsLayout>:
     attachments: self
     size_hint: 1, None