Mercurial > libervia-desktop-kivy
comparison libervia/desktop_kivy/kv/common.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/common.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 | |
18 <NotifLabel>: | |
19 background_color: app.c_sec_light | |
20 size_hint: None, None | |
21 text_size: None, root.height | |
22 padding_x: sp(5) | |
23 size: self.texture_size | |
24 bold: True | |
25 canvas.before: | |
26 Color: | |
27 # self.background_color doesn't seem initialized correctly on startup | |
28 # (maybe a Kivy bug? to be checked), thus we use the "or" below | |
29 rgb: self.background_color or app.c_sec_light | |
30 Ellipse: | |
31 size: self.size | |
32 pos: self.pos | |
33 | |
34 | |
35 <ContactItem>: | |
36 size_hint: None, None | |
37 width: self.base_width | |
38 height: self.minimum_height | |
39 orientation: 'vertical' | |
40 avatar: avatar | |
41 avatar_layout: avatar_layout | |
42 FloatLayout: | |
43 id: avatar_layout | |
44 size_hint: 1, None | |
45 height: dp(60) | |
46 Avatar: | |
47 id: avatar | |
48 pos_hint: {'x': 0, 'y': 0} | |
49 data: root.data.get('avatar') | |
50 allow_stretch: True | |
51 BoxLayout: | |
52 id: label_box | |
53 size_hint: 1, None | |
54 height: self.minimum_height | |
55 Label: | |
56 size_hint: 1, None | |
57 height: self.font_size + sp(5) | |
58 text_size: self.size | |
59 shorten: True | |
60 shorten_from: "right" | |
61 text: root.data.get('nick', root.jid.node or root.jid) | |
62 bold: True | |
63 valign: 'middle' | |
64 halign: 'center' | |
65 | |
66 | |
67 <JidItem>: | |
68 size_hint: 1, None | |
69 height: dp(68) | |
70 avatar: avatar | |
71 padding: 0, dp(2), 0, dp(2) | |
72 canvas.before: | |
73 Color: | |
74 rgba: self.bg_color | |
75 Rectangle: | |
76 pos: self.pos | |
77 size: self.size | |
78 Image: | |
79 id: avatar | |
80 size_hint: None, None | |
81 size: dp(64), dp(64) | |
82 Label: | |
83 size_hint: 1, 1 | |
84 text_size: self.size | |
85 color: root.color | |
86 bold: True | |
87 text: root.jid | |
88 halign: 'left' | |
89 valign: 'middle' | |
90 padding_x: dp(5) | |
91 | |
92 <JidToggle>: | |
93 canvas.before: | |
94 Color: | |
95 rgba: self.selected_color if self.state == 'down' else self.bg_color | |
96 Rectangle: | |
97 pos: self.pos | |
98 size: self.size | |
99 | |
100 <Symbol>: | |
101 width: dp(35) | |
102 height: dp(35) | |
103 font_name: app.expand('{media}/fonts/fontello/font/fontello.ttf') | |
104 text_size: self.size | |
105 font_size: dp(30) | |
106 halign: 'center' | |
107 valign: 'middle' | |
108 bg_color: 0, 0, 0, 0 | |
109 canvas.before: | |
110 Color: | |
111 rgba: self.bg_color | |
112 Rectangle: | |
113 pos: self.pos | |
114 size: self.size | |
115 | |
116 <SymbolLabel>: | |
117 size_hint: None, 1 | |
118 width: self.minimum_width | |
119 symbol_wid: symbol_wid | |
120 label: label | |
121 Symbol: | |
122 id: symbol_wid | |
123 size_hint: None, 1 | |
124 symbol: root.symbol | |
125 color: root.color | |
126 Label: | |
127 id: label | |
128 size_hint: None, 1 | |
129 text_size: None, root.height | |
130 size: self.texture_size | |
131 padding_x: dp(5) | |
132 valign: 'middle' | |
133 text: root.text | |
134 bold: root.bold | |
135 | |
136 <SymbolToggleLabel>: | |
137 color: 0, 0, 0, 1 | |
138 canvas.before: | |
139 Color: | |
140 rgba: app.c_sec_light if self.state == 'down' else (0, 0, 0, 0) | |
141 RoundedRectangle: | |
142 pos: self.pos | |
143 size: self.size | |
144 | |
145 <ActionSymbol>: | |
146 bg_color: 0, 0, 0, 0 | |
147 color: app.c_sec_light | |
148 | |
149 <SizedImage>: | |
150 size_hint: None, None | |
151 | |
152 | |
153 <JidSelectorCategoryLayout>: | |
154 size_hint: 1, None | |
155 height: self.minimum_height | |
156 spacing: 0 | |
157 | |
158 <JidSelector>: | |
159 layout: layout | |
160 StackLayout: | |
161 id: layout | |
162 size_hint: 1, None | |
163 height: self.minimum_height | |
164 spacing: 0 |