111 lines
2.8 KiB
Plaintext
111 lines
2.8 KiB
Plaintext
<MultistrokeSettingsContainer>:
|
|
cols: 1
|
|
spacing: 5
|
|
padding: 5
|
|
size_hint_y: None
|
|
height: self.minimum_height
|
|
|
|
<MultistrokeSettingItem>:
|
|
size_hint_y: None
|
|
height: 70
|
|
rows: 1
|
|
canvas:
|
|
Color:
|
|
rgba: 47 / 255., 167 / 255., 212 / 255., .1
|
|
Rectangle:
|
|
pos: self.x, self.y + 1
|
|
size: self.size
|
|
Color:
|
|
rgb: .2, .2, .2
|
|
Rectangle:
|
|
pos: self.x, self.y - 2
|
|
size: self.width, 1
|
|
Label:
|
|
size_hint_x: .6
|
|
id: labellayout
|
|
markup: True
|
|
text: u'{0}\n[size=13sp][color=999999]{1}[/color][/size]'.format(root.title or '', root.desc or '')
|
|
font_size: '15sp'
|
|
text_size: self.size
|
|
valign: 'top'
|
|
|
|
<MultistrokeSettingTitle>:
|
|
size_hint_y: None
|
|
height: 40
|
|
markup: True
|
|
text: u'{0}\n[size=13sp][color=999999]{1}[/color][/size]'.format(root.title or '', root.desc or '')
|
|
font_size: '15sp'
|
|
text_size: self.size
|
|
valign: 'top'
|
|
halign: 'right'
|
|
canvas:
|
|
Color:
|
|
rgba: 47 / 255., 167 / 255., 212 / 255., .4
|
|
Rectangle:
|
|
pos: self.x, self.y + 1
|
|
size: self.size
|
|
Color:
|
|
rgb: .5, .5, .5
|
|
Rectangle:
|
|
pos: self.x, self.y - 2
|
|
size: self.width, 1
|
|
|
|
<MultistrokeSettingBoolean>:
|
|
value: button.state == 'down' and True or False
|
|
ToggleButton:
|
|
id: button
|
|
text: root.button_text
|
|
size_hint_x: None
|
|
width: 150
|
|
pos: root.pos
|
|
state: root.value and 'down' or 'normal'
|
|
|
|
<MultistrokeSettingString>:
|
|
value: input.text
|
|
AnchorLayout:
|
|
size_hint_x: None
|
|
width: 150
|
|
TextInput:
|
|
id: input
|
|
size_hint_y: None
|
|
height: 30
|
|
pos: root.pos
|
|
multiline: True
|
|
text: root.value
|
|
|
|
<MultistrokeSettingSlider>:
|
|
value: slider.value
|
|
Label:
|
|
id: sliderlabel
|
|
size_hint_x: None
|
|
width: 50
|
|
text: str(root._to_numtype(slider.value))
|
|
Slider:
|
|
id: slider
|
|
min: root.min
|
|
max: root.max
|
|
pos: root.pos
|
|
size_hint_x: None
|
|
width: 150
|
|
value: root.value
|
|
|
|
<EditSettingPopup>:
|
|
size_hint: None, None
|
|
size: 300, 150
|
|
title: 'Edit setting'
|
|
BoxLayout:
|
|
orientation: 'vertical'
|
|
TextInput:
|
|
id: input
|
|
markup: False
|
|
multiline: False
|
|
on_text_validate: root.dispatch('on_validate', self.text)
|
|
BoxLayout:
|
|
orientation: 'horizontal'
|
|
Button:
|
|
text: 'OK'
|
|
on_press: root.dispatch('on_validate', input.text)
|
|
Button:
|
|
text: 'Cancel'
|
|
on_press: root.dismiss()
|