/usr/share/kivi-examples/widgets/boxlayout_poshint.py is in python-kivy-examples 1.7.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | from kivy.uix.gridlayout import GridLayout
from kivy.app import App
from kivy.lang import Builder
Builder.load_string('''
<Demo>:
cols: 1
BoxLayout:
orientation: 'vertical'
Button:
size_hint_x: 0.4
pos_hint: {'x': 0}
text: 'pos_hint: x=0'
Button:
size_hint_x: 0.2
pos_hint: {'center_x': 0.5}
text: 'pos_hint: center_x=0.5'
Button:
size_hint_x: 0.4
pos_hint: {'right': 1}
text: 'pos_hint: right=1'
BoxLayout:
Button:
size_hint_y: 0.4
pos_hint: {'y': 0}
text: 'pos_hint: y=0'
Button:
size_hint_y: 0.2
pos_hint: {'center_y': .5}
text: 'pos_hint: center_y=0.5'
Button:
size_hint_y: 0.4
pos_hint: {'top': 1}
text: 'pos_hint: top=1'
''')
class Demo(GridLayout):
pass
class DemoApp(App):
def build(self):
return Demo()
if __name__ == '__main__':
DemoApp().run()
|