enter image description hereI drew a frame in S2, it was supposed to be in S2 (i.e. on the right side, in the middle) but it appears in the lower corner, at 100, 100 of the screen
so a bit like above. the link is the home screen
Am I misattributing something?
class R(Widget):
def __init__(self,x,y,szer,wys, kB=(1, 1, 1, 1)):
self.x=x
self.y=y
self.szer=szer
self.wys=wys
super().__init__()
with self.canvas:
Color(*kB)
#width=2.0
#Line(points=(self.x,self.y,self.szer,self.wys))
Line(rectangle=(self.x,self.y,self.szer,self.wys),width=1.5)
#print(str(self.height))
Okno = BoxLayout(orientation='vertical', spacing=10)
Top = BoxLayout(orientation='horizontal', spacing=10,size_hint=(1, .35))
F.CustomGraphics.SetBG(Top, bg_color=[0,1,0,0.2])
Top.add_widget(Label(text="aaaaa"))
Srodek = BoxLayout(orientation='horizontal', spacing=10)
S1 = BoxLayout(orientation='vertical', spacing=10)
F.CustomGraphics.SetBG(S1, bg_color=[1,0,0,0.2])
S1.add_widget(Label(text="bb 11"))
Srodek.add_widget(S1)
S2 = BoxLayout(orientation='vertical', spacing=10)
F.CustomGraphics.SetBG(S2, bg_color=[1,1,0,0.2])
S2.add_widget(F.R(100,100,100,100, kB=Ziel50))
Srodek.add_widget(S2)
Bottom = BoxLayout(orientation='horizontal', spacing=10,size_hint=(1, .35))
F.CustomGraphics.SetBG(Bottom, bg_color=[0,0,1,0.2])
Bottom.add_widget(Label(text="cccc"))
Okno.add_widget(Top)
Okno.add_widget(Srodek)
Okno.add_widget(Bottom)
self.add_widget(Okno)
the green square should be in a different place