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.lang import Builder | |
root = Builder.load_string(''' | |
<ScaleLabel@Label>: | |
_scale: 1. if self.texture_size[0] < self.width else float(self.width) / self.texture_size[0] | |
canvas.before: | |
PushMatrix | |
Scale: | |
origin: self.center |