Skip to content

Instantly share code, notes, and snippets.

@inclement
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save inclement/14023d2bf699c1a2db7f to your computer and use it in GitHub Desktop.

Select an option

Save inclement/14023d2bf699c1a2db7f to your computer and use it in GitHub Desktop.
#:kivy 1.0.9
TestWidget:
<RectangleWidget@Widget>:
source: ''
canvas:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: self.size
source: root.source
<TestWidget>:
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal' # This is actually the default
size_hint_y: None
height: 88
RectangleWidget:
RectangleWidget:
size_hint_x: None
width: 160
source: 'logo-slim.png'
RectangleWidget:
size_hint_x: None
width: 35
GridLayout:
cols: 2
rows: 10
pos: 0, 114
size: root.width, root.height-114-88
Button:
text: "Check"
font_size: 14
#pos: 50, 27
size: 75, 55
id: checkbutton
on_press: app.chk_btn_callback(self)
Label:
#font_size: 14
#pos: checkbutton.center_x, checkbutton.center_y
size: 75, 55
text: "Disconnected"
Button:
text: "Text"
Label:
text: "Abc"
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: 88
Widget: # I'm using this just as a spacer, since you have nothing here
RectangleWidget:
size_hint_x: None
width: 425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment