Skip to content

Instantly share code, notes, and snippets.

@GreyGnome
Created June 23, 2016 22:44
Show Gist options
  • Save GreyGnome/1bb47a28e36f02c5ad295dca3f1f4902 to your computer and use it in GitHub Desktop.
Save GreyGnome/1bb47a28e36f02c5ad295dca3f1f4902 to your computer and use it in GitHub Desktop.
Kivy file to go with my scrollview code
#:kivy 1.0.4
<MyScrollView>:
canvas:
Color:
rgb: 0.5, 0.1, 0.7
Rectangle:
pos: self.pos
size: self.size
size_hint: None, None
width: 200
height: 200
#pos_hint: {'center_x': 0.5, 'center_y': 0.5}
#do_scroll_x: False
<MyStackLayout>:
canvas:
Color:
rgb: 0.2, 0.2, 1
Rectangle:
pos: self.pos
size: self.size
width: 400
height: 400
padding: 10
spacing: 10
size_hint: None, None
<MyFloatLayout>:
canvas:
Color:
rgb: 0.5, 0.5, 0.5
Rectangle:
pos: self.pos
size: self.size
size_hint: 1.0, 1.0
<MyLabel>:
# canvas.before:
# Color:
# rgba: 0.9, 0.0, 0.0, 1.0
# Rectangle:
# pos: self.pos
# size: self.size
size_hint: None, None
width: 100
height: 40
# texture_size: 100, 20
text_size: 100, 15
halign: 'left'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment