comparison libervia/desktop_kivy/kv/cagou_widget.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/cagou_widget.kv@3c9ba4a694ef
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 C libervia.desktop_kivy.core.constants.Const
18
19
20 <HeaderChoice>:
21 canvas.before:
22 Color:
23 rgba: 1, 1, 1, 1
24 BorderImage:
25 pos: self.pos
26 size: self.size
27 source: 'atlas://data/images/defaulttheme/button'
28 size_hint_y: None
29 height: dp(44)
30 spacing: dp(20)
31 padding: dp(5), dp(3), dp(10), dp(3)
32
33 <HeaderChoiceWidget>:
34 ActionIcon:
35 plugin_info: root.plugin_info
36 size_hint: None, 1
37 width: self.height
38 Label:
39 size_hint: None, 1
40 text: root.plugin_info['name']
41 color: 1, 1, 1, 1
42 bold: True
43 size: self.texture_size
44 halign: "center"
45 valign: "middle"
46
47 <HeaderChoiceExtraMenu>:
48 ActionSymbol:
49 symbol: "dot-3-vert"
50 size_hint: None, 1
51 width: self.height
52 Label:
53 size_hint: None, 1
54 text: _("extra")
55 color: 1, 1, 1, 1
56 bold: True
57 size: self.texture_size
58 halign: "center"
59 valign: "middle"
60
61 <HeaderWidgetSelector>:
62 size_hint: None, None
63 auto_width: False
64 canvas.before:
65 Color:
66 rgba: 0, 0, 0, 1
67 Rectangle:
68 pos: self.pos
69 size: self.size
70
71 <LiberviaDesktopKivyWidget>:
72 header_box: header_box
73 orientation: "vertical"
74 BoxLayout:
75 id: header_box
76 size_hint: 1, None
77 height: dp(32)
78 spacing: dp(3)
79 padding: app.MARGIN_LEFT, 0, app.MARGIN_RIGHT, 0
80 HeaderWidgetCurrent:
81 plugin_info: root.plugin_info
82 size_hint: None, 1
83 width: self.height
84 on_release: root.selector.open(self)