comparison libervia/desktop_kivy/plugins/plugin_wid_calls.kv @ 510:97ab236e8f20

plugin calls: implement desktop sharing: rel 433
author Goffi <goffi@goffi.org>
date Tue, 16 Jan 2024 10:41:38 +0100
parents 0480f883f0a6
children d78728d7fd6a
comparison
equal deleted inserted replaced
509:f0ce49b360c8 510:97ab236e8f20
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details. 12 # GNU Affero General Public License for more details.
13 13
14 # You should have received a copy of the GNU Affero General Public License 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/>. 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
18 <WindowSelectButton>:
19 size_hint_y: None
20 height: '44dp'
21 color: 0.8, 0.8, 0.8, 1
22
23
24 <DesktopScreenDialog>:
25 title: "Select a Screen or Window"
26 size_hint: 0.8, 0.8
27 windows_buttons: windows_buttons
28 BoxLayout:
29 orientation: "vertical"
30 ScrollView:
31 BoxLayout:
32 id: windows_buttons
33 orientation: "vertical"
34 size_hint_y: None
35 height: self.minimum_height
36 WindowSelectButton:
37 text: "Full Screen"
38 on_press: root.on_window_selected(None, None)
39
40 Button:
41 size_hint_y: None
42 height: '44dp'
43 text: 'Close'
44 on_release: root.dismiss()
45
16 46
17 <CallControlButton>: 47 <CallControlButton>:
18 size_hint: None, None 48 size_hint: None, None
19 size: "50dp", "50dp" 49 size: "50dp", "50dp"
20 color: 1, 1, 1, 1 50 color: 1, 1, 1, 1
96 126
97 127
98 BoxLayout: 128 BoxLayout:
99 id: call_controls 129 id: call_controls
100 orientation: "horizontal" 130 orientation: "horizontal"
101 size_hint: 0.5, None # Adjusted to 50% of the width 131 size_hint: 0.5, None
102 height: "50dp" 132 height: "50dp"
103 pos_hint: {"x": 0.25, "y": 0.05} # Adjusted starting position 133 pos_hint: {"x": 0.25, "y": 0.05}
104 spacing: "30dp" 134 spacing: "30dp"
105 Widget: 135 Widget:
106 136
107 CallControlButton: 137 CallControlButton:
108 symbol: "videocam" 138 symbol: "videocam"
112 CallControlButton: 142 CallControlButton:
113 symbol: "volume-up" 143 symbol: "volume-up"
114 active: not root.audio_muted 144 active: not root.audio_muted
115 on_press: root.audio_muted = not root.audio_muted 145 on_press: root.audio_muted = not root.audio_muted
116 146
147 CallControlButton:
148 symbol: "desktop"
149 active: root.desktop_sharing
150 background_color: (0.28, 0.78, 0.56, 1) if not self.active else (0.95, 0.27, 0.41, 1)
151 on_press: root.on_desktop_btn_press()
152 canvas.after:
153 Color:
154 rgba: (0, 0, 0, 0) if self.active else (0.4, 0.4, 0.4, 1)
155 Line:
156 points: [self.x + dp(10), self.y + dp(10), self.right - dp(10), self.top - dp(10)]
157 width: 2
158 cap: "round"
117 159
118 CallControlButton: 160 CallControlButton:
119 symbol: "phone" 161 symbol: "phone"
120 background_color: 0.95, 0.27, 0.41, 1 162 background_color: 0.95, 0.27, 0.41, 1
121 on_press: root.hang_up() 163 on_press: root.hang_up()