-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswitcher.kv
executable file
·106 lines (104 loc) · 3.12 KB
/
switcher.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#: import Window kivy.core.window.Window
<Switcher>:
open_switch_button: open_switch_button
close_switch_button: close_switch_button
background: background
background_image: background_image
progs_layout: progs_layout
pbase_button: pbase_button
shutdown_button: shutdown_button
install_updates_buttons: install_updates_buttons
popup: popup
height: 150
y: Window.height-150
Widget:
id: background
Image:
id: background_image
source: 'images/bg.png'
height: 150
y: Window.height
size_hint_y: None
allow_stretch: True
keep_ratio: False
width: Window.width
Button:
id: open_switch_button
size: 50, 50
pos: Window.width-100, Window.height-100
background_normal: 'images/switch_normal.png'
background_pressed: 'images/switch_pressed.png'
on_press: root.switch_open=True
Button:
id: close_switch_button
size: 50, 50
pos: Window.width-100, Window.height-100
background_normal: 'images/switch_normal.png'
background_pressed: 'images/switch_pressed.png'
on_press: root.switch_open=False
Button:
id: pbase_button
size: 80,50
text: "PBase"
pos: Window.width-210, root.y+50
on_press: root.show_pbase()
Button:
id: shutdown_button
size: 100,50
text: 'Shutdown'
pos: Window.width-350, pbase_button.y
on_press: root.request_shutdown()
Button:
id: install_updates_buttons
size: 100,50
text: 'Install updates'
pos: Window.width-490, pbase_button.y
on_press: root.install_updates()
BoxLayout:
id: progs_layout
orientation: 'horizontal'
y: Window.height+25
spacing: 20
x: root.x+20
height: 100
width: (len(progs_layout.children)*100)+((len(progs_layout.children)-1)*20)
Popup:
id: popup
title: "Are you sure, you wanna quit PBase and all running Progs?"
content: popup_layout
size_hint: None, None
size: 400, 200
BoxLayout:
id: popup_layout
orientation: 'horizontal'
Button:
text: "Shutdown"
on_press: root.shutdown(False)
Button:
text: "Reboot"
on_press: root.shutdown(True)
[ButtonItem@Button]:
background_normal: ctx.path
background_down: ctx.path
border:0, 0, 0, 0
close_prog_button: close_prog_button
Label:
id: label
text: ctx.name
width: 100
height: 20
text_size: self.size
center_x: root.center_x
y: 10
shorten: True
halign: 'center'
font_size: 10
color: 0,0,0,1
bold: True
Button:
id: close_prog_button
border:0, 0, 0, 0
background_normal: 'images/close_prog.png'
background_down: 'images/close_prog.png'
size: 35,35
pos: root.x+root.width-self.width, root.y+root.height-self.height