comparison libervia/desktop_kivy/kv/dialog.kv @ 493:b3cedbee561d

refactoring: rename `cagou` to `libervia.desktop_kivy` + update imports and names following backend changes
author Goffi <goffi@goffi.org>
date Fri, 02 Jun 2023 18:26:16 +0200
parents cagou/kv/dialog.kv@3c9ba4a694ef
children
comparison
equal deleted inserted replaced
492:5114bbb5daa3 493:b3cedbee561d
1 #Libervia Desktop-Kivy
2 # Copyright (C) 2016-2021 Jérôme Poisson (goffi@goffi.org)
3
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Affero General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
13
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/>.
16
17 #:import _ libervia.backend.core.i18n._
18
19
20 <MessageDialog>:
21 orientation: "vertical"
22 spacing: dp(5)
23 canvas.before:
24 Color:
25 rgba: 0, 0, 0, 1
26 Rectangle:
27 pos: self.pos
28 size: self.size
29 Label:
30 size_hint: 1, None
31 text_size: root.width, None
32 size: self.texture_size
33 font_size: sp(20)
34 padding: dp(5), dp(10)
35 color: 1, 1, 1, 1
36 text: root.title
37 halign: "center"
38 italic: True
39 bold: True
40 Label:
41 text: root.message
42 text_size: root.width, None
43 size: self.texture_size
44 padding: dp(25), 0
45 font_size: sp(20)
46 color: 1, 1, 1, 1
47 Button:
48 size_hint: 1, None
49 height: dp(50)
50 background_color: 0.33, 1.0, 0.0, 1
51 text: _("Close")
52 bold: True
53 on_release: root.close_cb()
54
55
56 <ConfirmDialog>:
57 orientation: "vertical"
58 spacing: dp(5)
59 canvas.before:
60 Color:
61 rgba: 0, 0, 0, 1
62 Rectangle:
63 pos: self.pos
64 size: self.size
65 Label:
66 size_hint: 1, None
67 text_size: root.width, None
68 size: self.texture_size
69 font_size: sp(20)
70 padding: dp(5), dp(10)
71 color: 1, 1, 1, 1
72 text: root.title
73 halign: "center"
74 italic: True
75 bold: True
76 Label:
77 text: root.message
78 text_size: root.width, None
79 size: self.texture_size
80 padding: dp(25), 0
81 font_size: sp(20)
82 color: 1, 1, 1, 1
83 Button:
84 size_hint: 1, None
85 height: dp(50)
86 background_color: 0.33, 1.0, 0.0, 1
87 text: _("Yes")
88 bold: True
89 on_release: root.yes_cb() if root.yes_cb is not None else None
90 Button:
91 size_hint: 1, None
92 height: dp(50)
93 text: _("No")
94 bold: True
95 on_release: root.no_cb() if root.no_cb is not None else None