0
Iam嘗試將floatlayout對齊中心,幫助我? 上傳的圖像瞭解... 我的想法是在Kivy中添加圖標窗口8復古按鈕後重新創建佈局Windows 8復古。我無法在基維中心對齊FloatLayout
我的KV文件:
<SMAgro>:
AnchorLayout:
anchor_x: 'center'
anchor_y: 'center'
FloatLayout:
canvas:
Color:
rgb: [1,1,1,1]
Rectangle:
pos: self.pos
size: self.size
Button:
background_color: [.4,1,.1,1]
pos_hint: {'x': 0.26, 'y': 0.328571}
size_hint: 0.45, 0.3
text: "Equipamentos"
# StackLayout:
# pos: self.parent.pos
# size: self.parent.size
# orientation: 'lr-tb'
# Image:
# source: 'kivy.png'
# size_hint_x: None
# width: 74
# Label:
# size_hint_x: None
# width: 100
# text: "Equipamentos"
Button:
background_color: [.4,1,.1,1]
pos_hint: {'x': 0.26, 'y': 0.15}
size_hint: 0.225, 0.18
text: 'Configuracoes'
Button:
background_color: [.4,1,.1,1]
pos_hint: {'x': 0.486, 'y': 0.15}
size_hint: 0.225, 0.18
text: 'Sobre'
工作的兄弟,IAM不理解......我想...... 謝謝! –
對不起,不好說明,但我的英語不是很好。最主要的是,將一個事物(本例中爲FloatLayout)居中會比中心許多事情更容易(這裏是3個按鈕) –