This is a really interesting question, and Malonge tried it in a good way. Right now (1.9.2-dev) there is still a fixed size on the CheckBox well, call it the background. This is the image that Widget takes from the atlas and changes if the state changes. Therefore, until now there was no clear way to do this. Here is an example. Soon, the wizard will have the CheckBox(color=[r,g,b,a]) option CheckBox(color=[r,g,b,a]) . Thanks;)
from kivy.lang import Builder from kivy.base import runTouchApp from kivy.uix.boxlayout import BoxLayout Builder.load_string(''' <CheckBoxBG>: Label: TextInput: CheckBox: canvas.before: Color: rgb: 1,0,0 Rectangle: pos:self.center_x-8, self.center_y-8 size:[16,16] Color: rgb: 0,0,0 Rectangle: pos:self.center_x-7, self.center_y-7 size:[14,14] ''') class CheckBoxBG(BoxLayout):pass runTouchApp(CheckBoxBG())
source share