-
-
Save FeralBytes/d2a2b5890d2f3b8a998903bc724477d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#: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