PyBitmessage-2021-04-27/src/bitmessagekivy/kv/msg_composer.kv

153 lines
5.0 KiB
Plaintext

<Create>:
name: 'create'
Loader:
<DropDownWidget>:
ScrollView:
id: id_scroll
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height + 3 * self.parent.height/4
padding: dp(20)
spacing: 15
BoxLayout:
orientation: 'vertical'
MyMDTextField:
id: ti
hint_text: 'type or select sender address'
size_hint_y: None
height: 100
font_size: dp(15)
multiline: False
required: True
helper_text_mode: "on_error"
canvas.before:
Color:
rgba: (0,0,0,1)
BoxLayout:
size_hint_y: None
height: dp(40)
CustomSpinner:
id: btn
background_color: app.theme_cls.primary_dark
values: app.variable_1
on_text: root.auto_fill_fromaddr() if self.text != 'Select' else ''
option_cls: Factory.get("ComposerSpinnerOption")
#background_color: color_button if self.state == 'normal' else color_button_pressed
#background_down: 'atlas://data/images/defaulttheme/spinner'
background_normal: ''
background_color: app.theme_cls.primary_color
color: color_font
font_size: '13.5sp'
ArrowImg:
BoxLayout:
orientation: 'horizontal'
BoxLayout:
orientation: 'vertical'
txt_input: txt_input
rv: rv
size : (890, 60)
MyTextInput:
id: txt_input
size_hint_y: None
font_size: '15sp'
height: self.parent.height/2
hint_text: app.tr._('type, select or scan QR code for recipients address')
RV:
id: rv
MDIconButton:
icon: 'qrcode-scan'
pos_hint: {'center_x': 0, 'center_y': .8}
on_release:
if root.is_camara_attached(): app.root.ids.scr_mngr.current = 'scanscreen'
else: root.camera_alert()
on_press:
app.root.ids.sc23.get_screen('composer')
MyMDTextField:
id: subject
hint_text: 'subject'
required: True
height: 100
font_size: '15sp'
size_hint_y: None
multiline: False
helper_text_mode: "on_error"
canvas.before:
Color:
rgba: (0,0,0,1)
# MyMDTextField:
# id: body
# multiline: True
# hint_text: 'body'
# size_hint_y: None
# font_size: '15sp'
# required: True
# helper_text_mode: "on_error"
# canvas.before:
# Color:
# rgba: (0,0,0,1)
ScrollView:
id: scrlv
TextInput:
id: body
# text: 'srggdfsfhgfg'
hint_text: 'body'
size_hint: 1, None
height: app.window_size[1]/4
BoxLayout:
spacing:50
<MyTextInput>:
readonly: False
multiline: False
<SelectableLabel>:
# Draw a background to indicate selection
color: 0,0,0,1
canvas.before:
Color:
rgba: app.theme_cls.primary_dark if self.selected else (1, 1, 1, 0)
Rectangle:
pos: self.pos
size: self.size
<RV>:
canvas:
Color:
rgba: 0,0,0,.2
Line:
rectangle: self.x +1 , self.y, self.width - 2, self.height -2
bar_width: 10
scroll_type:['bars']
viewclass: 'SelectableLabel'
SelectableRecycleBoxLayout:
default_size: None, dp(20)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: 'vertical'
multiselect: False
<MyMDTextField@MDTextField>:
canvas.before:
Color:
rgba: (0,0,0,1)
<ComposerSpinnerOption@SpinnerOption>:
font_size: '13.5sp'
#background_color: color_button if self.state == 'down' else color_button_pressed
#background_down: 'atlas://data/images/defaulttheme/button'
background_normal: 'atlas://data/images/defaulttheme/textinput_active'
background_color: app.theme_cls.primary_color
color: color_font