comparison cagou/plugins/plugin_wid_remote.kv @ 238:7918a5668304

plugin remote: remote controllers plugin first draft: this plugin handle ad-hoc commands and media controllers in a easy way.
author Goffi <goffi@goffi.org>
date Fri, 31 Aug 2018 17:01:31 +0200
parents
children cf61a011f731
comparison
equal deleted inserted replaced
237:059c5b39032d 238:7918a5668304
1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client
2 # Copyright (C) 2016-2018 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 <RemoteControl>:
19 float_layout: float_layout
20 layout: layout
21 FloatLayout:
22 id: float_layout
23 ScrollView:
24 size_hint: 1, 1
25 pos_hint: {'x': 0, 'y': 0}
26 do_scroll_x: False
27 scroll_type: ['bars', 'content']
28 bar_width: dp(6)
29 StackLayout:
30 id: layout
31 size_hint: 1, None
32 height: self.minimum_height
33 spacing: 0
34
35
36 <RemoteItemWidget>:
37 shared: False
38 Symbol:
39 size_hint: 1, None
40 height: dp(80)
41 symbol: 'video'
42 margin: dp(40)
43 color: 0, 0, 0, 1
44 Label:
45 size_hint: None, None
46 width: dp(100)
47 font_size: sp(14)
48 text_size: dp(95), None
49 size: self.texture_size
50 text: root.name
51 halign: 'center'
52
53
54 <PlayerLabel@Label>:
55 size_hint: 1, None
56 text_size: self.width, None
57 size: self.texture_size
58 halign: 'center'
59
60
61 <PlayerButton@SymbolButton>:
62 size_hint: None, 1
63
64
65 <MediaPlayerControlWidget>:
66 orientation: 'vertical'
67 PlayerLabel:
68 text: root.title
69 bold: True
70 font_size: '20sp'
71 PlayerLabel:
72 text: root.identity
73 font_size: '15sp'
74 Widget:
75 size_hint: 1, None
76 height: dp(50)
77 BoxLayout:
78 size_hint: 1, None
79 spacing: dp(20)
80 height: dp(30)
81 Widget:
82 PlayerButton:
83 symbol: "previous"
84 on_release: root.do_cmd("Previous")
85 PlayerButton:
86 symbol: "fast-bw"
87 on_release: root.do_cmd("GoBack")
88 PlayerButton:
89 symbol: root.status
90 on_release: root.do_cmd("PlayPause")
91 PlayerButton
92 symbol: "fast-fw"
93 on_release: root.do_cmd("GoFW")
94 PlayerButton
95 symbol: "next"
96 on_release: root.do_cmd("Next")
97 Widget:
98 Widget: