Reputation: 1122
I'm using the TabbedPanel (with the default tab_pos: "top_left"
) but the headers (as one can see in the docs) are slighty not on the left. It's like there is a small padding-left of 1px which is applied. I can't figure out how to configure that. Any insights? Thanks!
Upvotes: 0
Views: 106
Reputation: 8747
A hacky, non-pretty solution:
from kivy.app import App
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.lang import Builder
Builder.load_string('''
<MyWidget>:
TabbedPanelItem:
text: 'tab1'
TabbedPanelItem:
text: 'tab2'
''')
class MyWidget(TabbedPanel):
def __init__(self, **kwargs):
super(MyWidget, self).__init__(**kwargs)
self._tab_layout.padding = [0, 0, 0, 0]
class MyApp(App):
def build(self):
return MyWidget()
if __name__ == '__main__':
MyApp().run()
Upvotes: 1