Skip to content

Instantly share code, notes, and snippets.

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