annotate cagou/plugins/plugin_wid_file_sharing.kv @ 327:b77792cc6d12

use Kivy garden's new infrastructure for modernmenu and contextmenu: dependencies are updated, the legacy kivy-garden tool is not needed anymore, thus installation is simplified.
author Goffi <goffi@goffi.org>
date Wed, 11 Dec 2019 18:26:42 +0100
parents 1b835bcfa663
children 3c9ba4a694ef
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
192
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client
282
1b835bcfa663 date update
Goffi <goffi@goffi.org>
parents: 247
diff changeset
2 # Copyright (C) 2016-2019 Jérôme Poisson (goffi@goffi.org)
192
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
3
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 # This program is free software: you can redistribute it and/or modify
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 # it under the terms of the GNU Affero General Public License as published by
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 # the Free Software Foundation, either version 3 of the License, or
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 # (at your option) any later version.
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
8
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 # This program is distributed in the hope that it will be useful,
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 # GNU Affero General Public License for more details.
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
13
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 # You should have received a copy of the GNU Affero General Public License
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
16
327
b77792cc6d12 use Kivy garden's new infrastructure for modernmenu and contextmenu:
Goffi <goffi@goffi.org>
parents: 282
diff changeset
17 #:import ModernMenu kivy_garden.modernmenu.ModernMenu
192
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
18
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
19
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 <ModeBtn>:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 width: self.texture_size[0] + sp(20)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 size_hint: None, 1
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
23
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
24
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
25 <FileSharing>:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 float_layout: float_layout
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
27 layout: layout
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
28 FloatLayout:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
29 id: float_layout
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
30 ScrollView:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
31 size_hint: 1, 1
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
32 pos_hint: {'x': 0, 'y': 0}
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
33 do_scroll_x: False
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 scroll_type: ['bars', 'content']
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 bar_width: dp(6)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
36 StackLayout:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 id: layout
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 size_hint: 1, None
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
39 height: self.minimum_height
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 spacing: 0
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
41
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
42
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
43 <PathWidget>:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 shared: False
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
45 Symbol:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 size_hint: 1, None
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
47 height: dp(80)
247
cf61a011f731 core (notes), common (symbol): added an icon showing note level:
Goffi <goffi@goffi.org>
parents: 237
diff changeset
48 font_size: dp(40)
192
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
49 symbol: 'folder-open-empty' if root.is_dir else 'doc'
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
50 color: (1, 0, 0, 1) if root.shared else (0, 0, 0, 1) if root.is_dir else app.c_prim_dark
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
51 Label:
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
52 size_hint: None, None
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
53 width: dp(100)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
54 font_size: sp(14)
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
55 text_size: dp(95), None
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
56 size: self.texture_size
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
57 text: root.name
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
58 halign: 'center'
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
59
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
60
62198e00a2b7 plugin file sharing: first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
61 <LocalPathWidget>:
222
a676cb07c1cb core (menu): TouchMenuBehaviour:
Goffi <goffi@goffi.org>
parents: 206
diff changeset
62 shared: root.filepath in root.main_wid.shared_paths