sorry if it is a newbie question. I can't understand why my layouts refuse to cover my entire screen. Using a simple BoxLayout, whether I define size_hint: (1, 1) in my .kv file or not define it at all, all I get is a small section with my layout.
Here is my .py and .kv file. I feel like I am doing something very wrong, but can't get my hands on what.
main.py:
from kivy.app import App
from kivy.uix.widget import Widget
class MainWidget(Widget):
def __init__(self, **kwargs):
super().__init__(**kwargs)
class TestApp(App):
def build(self):
return MainWidget()
if __name__ == "__main__":
app = TestApp()
app.run()
Test.kv
<MainWidget>:
BoxLayout:
orientation: 'horizontal'
size_hint: (1,1)
BoxLayout:
Label:
id: the_number
text: "1"
BoxLayout:
orientation: 'vertical'
padding: 2
Button:
id: count_up
text: "+"
Button:
id: count_down
text: "-"
I've been working on a larger app, avoiding the .kv file and defining it all dynamically within the python files. Using relative values to Window.size seemed to work, but I felt like I was approaching it all the wrong way, and each time seemed harder to keep it working as desired. When I tried to return to kv for my static elements, starting from scratch, I couldn't make it work at all.