Skip to content

Instantly share code, notes, and snippets.

@FeralBytes
Forked from quintopia/main.py
Last active February 13, 2017 02:10
Show Gist options
  • Save FeralBytes/d2a2b5890d2f3b8a998903bc724477d9 to your computer and use it in GitHub Desktop.
Save FeralBytes/d2a2b5890d2f3b8a998903bc724477d9 to your computer and use it in GitHub Desktop.
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.scatter import Scatter
from kivy.core.window import Window
from kivy.uix.floatlayout import FloatLayout
Window.clearcolor = (1, 1, 1, 1)
class TextSquare(Widget):
pass
class ScatterTestApp(App):
def build(self):
f = FloatLayout()
scatter = Scatter(do_rotation=False,do_scale=False)
scatter.add_widget(TextSquare())
f.add_widget(scatter)
return f
if __name__ == '__main__':
ScatterTestApp().run()
#:kivy 1.0.9
<TextSquare>:
canvas:
Color:
rgb: 0,0,0
Rectangle:
pos: self.pos
size: self.width + 100, self.height + 50
Rectangle:
pos: self.pos
size: self.width + 80, self.height + 30
Label:
font_size: 30
center_x: self.width / 2
center_y: self.height / 2
text: "Test"
color: 0.5,0.5,0.5,1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment