FloatLayout:
orientation: "vertical"
Button:
pos_hint: {"x": 0.0, "y": .85}
size_hint: .30, .15
canvas:
Line:
points: (self.width/8, self.height/2, self.width*5/7, self.height/2)
width: 3
Line:
points: (self.width/8, self.height/2, self.width/2.6 , self.height*3/4)
width: 3
Line:
points: (self.width/8, self.height/2, self.width/2.6 , self.height/4)
width: 3
kv dosyasında bunu yapıp çalıştırdığımda buton düzgün konumlanıyor ama canvas butonun üstüne gelmiyor bilen varsa yardımcı olabilir mi
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
class main(BoxLayout):
pass
class app(App):
def build(self):
pass
app().run()
python kodu
main:
<main>:
FloatLayout:
orientation: "vertical"
Button:
pos_hint: {"x": 0.0, "y": .85}
size_hint: .30, .15
canvas:
Line:
points: (self.width/8, self.height/2, self.width*5/7, self.height/2)
width: 3
Line:
points: (self.width/8, self.height/2, self.width/2.6 , self.height*3/4)
width: 3
Line:
points: (self.width/8, self.height/2, self.width/2.6 , self.height/4)
width: 3
kv dosyası
çalıştırınca aldığım ekran
ok işareti butonun üstünde olmalı ama değil
Canvas relative layout dışındaki tüm widgetlarda otomatik olarak 0 0 konumunda oluyormuş relative layout da konum değiştirebiliyoruz kodun çalışan halinde buttonu bir relative layout içine alıp relative layout u konumlandırıp butonu relative layout un tamamını kaplayacak hale getirdiğimizde çalışıyor