diff cagou/kv/dialog.kv @ 243:50f7c000b4ae

xmlui: implemented MessageDialog
author Goffi <goffi@goffi.org>
date Thu, 03 Jan 2019 20:37:55 +0100
parents 1abd9d694e67
children 1b835bcfa663
line wrap: on
line diff
--- a/cagou/kv/dialog.kv	Thu Jan 03 10:52:57 2019 +0100
+++ b/cagou/kv/dialog.kv	Thu Jan 03 20:37:55 2019 +0100
@@ -16,6 +16,43 @@
 
 #:import _ sat.core.i18n._
 
+
+<MessageDialog>:
+    orientation: "vertical"
+    spacing: dp(5)
+    canvas.before:
+        Color:
+            rgba: 0, 0, 0, 1
+        Rectangle:
+            pos: self.pos
+            size: self.size
+    Label:
+        size_hint: 1, None
+        text_size: root.width, None
+        size: self.texture_size
+        font_size: sp(20)
+        padding: dp(5), dp(10)
+        color: 1, 1, 1, 1
+        text: root.title
+        halign: "center"
+        italic: True
+        bold: True
+    Label:
+        text: root.message
+        text_size: root.width, None
+        size: self.texture_size
+        padding: dp(25), 0
+        font_size: sp(20)
+        color: 1, 1, 1, 1
+    Button:
+        size_hint: 1, None
+        height: dp(50)
+        background_color: 0.33, 1.0, 0.0, 1
+        text: _("Close")
+        bold: True
+        on_release: root.close_cb()
+
+
 <ConfirmDialog>:
     orientation: "vertical"
     spacing: dp(5)