Your layout has a default size of 100x100 pixels. You can try to colorize it to see how much space it takes:
from kivy.app import App from kivy.uix.widget import Widget from kivy.lang import Builder kv = ''' <SublimeLauncher>: BoxLayout: canvas: Color: rgb: 1, 0, 0 Rectangle: size: self.size orientation: 'vertical' spacing: 10 Label: text: "Enter the path to the folder to open.\\nPress OK if you would like to open without a directory" TextInput: id: folderpath Button: text: 'OK' ''' Builder.load_string(kv) class SublimeLauncher(Widget): pass class SublimeLauncherApp(App): def build(self): return SublimeLauncher() if __name__ == "__main__": SublimeLauncherApp().run()
Non-default size setting:
kv = ''' <SublimeLauncher>: BoxLayout: size: 250, 250 canvas: Color: rgb: 1, 0, 0 Rectangle: size: self.size orientation: 'vertical' spacing: 10 Label: text: "Enter the path to the folder to open.\\nPress OK if you would like to open without a directory" TextInput: id: folderpath Button: text: 'OK' ''' Builder.load_string(kv)
Taking full space:
kv = ''' <SublimeLauncher>: BoxLayout: size: root.size canvas: Color: rgb: 1, 0, 0 Rectangle: size: self.size orientation: 'vertical' spacing: 10 Label: text: "Enter the path to the folder to open. \\nPress OK if you would like to open without a directory" TextInput: id: folderpath Button: text: 'OK' ''' Builder.load_string(kv)
source share