Mercurial > libervia-desktop-kivy
comparison libervia/desktop_kivy/kv/menu.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/menu.kv@203755bbe0fe |
children | 196483685a63 |
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 #:import C libervia.desktop_kivy.core.constants.Const | |
19 | |
20 <AboutContent>: | |
21 text_size: self.size | |
22 color: 1, 1, 1, 1 | |
23 halign: "center" | |
24 valign: "middle" | |
25 | |
26 <AboutPopup>: | |
27 title_align: "center" | |
28 size_hint: 0.8, 0.8 | |
29 | |
30 <ExtraMenuItem>: | |
31 size_hint: 1, None | |
32 height: dp(30) | |
33 | |
34 <ExtraSideMenu>: | |
35 bg_color: 0.23, 0.23, 0.23, 1 | |
36 ExtraMenuItem: | |
37 text: _("About") | |
38 on_press: root.on_about() | |
39 Widget: | |
40 # to push content to the top | |
41 | |
42 <TransferMenu>: | |
43 items_layout: items_layout | |
44 orientation: "vertical" | |
45 bg_color: app.c_prim | |
46 size_hint: 1, 0.5 | |
47 padding: [app.MARGIN_LEFT, 3, app.MARGIN_RIGHT, 0] | |
48 spacing: dp(5) | |
49 transfer_info: transfer_info | |
50 upload_btn: upload_btn | |
51 on_encrypted: self.update_transfer_info() | |
52 canvas.after: | |
53 Color: | |
54 rgba: app.c_prim_dark | |
55 Line: | |
56 points: 0, self.y + self.height, self.width + self.x, self.y + self.height | |
57 width: 1 | |
58 BoxLayout: | |
59 size_hint: 1, None | |
60 height: dp(50) | |
61 spacing: dp(10) | |
62 Widget: | |
63 SymbolToggleLabel | |
64 id: upload_btn | |
65 symbol: "upload" | |
66 text: _(u"upload") | |
67 group: "transfer" | |
68 state: "down" | |
69 on_state: root.update_transfer_info() | |
70 SymbolToggleLabel | |
71 id: send_btn | |
72 symbol: "loop-alt" | |
73 text: _(u"send") | |
74 group: "transfer" | |
75 Widget: | |
76 Label: | |
77 id: transfer_info | |
78 size_hint: 1, None | |
79 padding: 0, dp(5) | |
80 markup: True | |
81 text_size: self.width, None | |
82 size: self.texture_size | |
83 halign: 'center' | |
84 canvas.before: | |
85 Color: | |
86 rgba: app.c_prim_dark | |
87 RoundedRectangle: | |
88 pos: self.pos | |
89 size: self.size | |
90 ScrollView: | |
91 do_scroll_x: False | |
92 StackLayout: | |
93 size_hint: 1, None | |
94 padding: 20, 0 | |
95 spacing: 15, 5 | |
96 id: items_layout | |
97 | |
98 <TransferItem>: | |
99 orientation: "vertical" | |
100 size_hint: None, None | |
101 size: dp(50), dp(90) | |
102 IconButton: | |
103 source: root.plug_info['icon_medium'] | |
104 allow_stretch: True | |
105 size_hint: 1, None | |
106 height: dp(50) | |
107 Label: | |
108 color: 0, 0, 0, 1 | |
109 text: root.plug_info['name'] | |
110 text_size: self.size | |
111 halign: "center" | |
112 valign: "top" | |
113 | |
114 | |
115 <SideMenu>: | |
116 orientation: "vertical" | |
117 size_hint: self.size_hint_close | |
118 canvas.before: | |
119 Color: | |
120 rgba: self.bg_color | |
121 Rectangle: | |
122 pos: self.pos | |
123 size: self.size | |
124 | |
125 | |
126 <EntitiesSelectorMenu>: | |
127 bg_color: 0, 0, 0, 0.9 | |
128 filter_input: filter_input | |
129 layout: layout | |
130 callback_on_close: True | |
131 Label: | |
132 size_hint: 1, None | |
133 text_size: root.width, None | |
134 size: self.texture_size | |
135 padding: dp(5), dp(5) | |
136 color: 1, 1, 1, 1 | |
137 text: root.instructions | |
138 halign: "center" | |
139 TextInput: | |
140 id: filter_input | |
141 size_hint: 1, None | |
142 height: dp(32) | |
143 multiline: False | |
144 hint_text: _(u"enter filter here") | |
145 ScrollView: | |
146 size_hint: 1, 1 | |
147 BoxLayout: | |
148 id: layout | |
149 orientation: "vertical" | |
150 size_hint: 1, None | |
151 height: self.minimum_height | |
152 spacing: dp(5) |