Stav 23.06.2026

This commit is contained in:
2026-06-23 15:20:56 +02:00
commit 6d91e83e8c
5670 changed files with 1145969 additions and 0 deletions
@@ -0,0 +1,30 @@
'''
uix.relativelayout tests
========================
'''
import unittest
from kivy.base import EventLoop
from kivy.tests import UTMotionEvent
from kivy.uix.relativelayout import RelativeLayout
class UixRelativeLayoutTest(unittest.TestCase):
def test_relativelayout_on_touch_move(self):
EventLoop.ensure_window()
rl = RelativeLayout()
EventLoop.window.add_widget(rl)
touch = UTMotionEvent("unittest", 1, {"x": .5, "y": .5})
EventLoop.post_dispatch_input("begin", touch)
touch.move({"x": .6, "y": .4})
EventLoop.post_dispatch_input("update", touch)
EventLoop.post_dispatch_input("end", touch)
def test_relativelayout_coordinates(self):
EventLoop.ensure_window()
rl = RelativeLayout(pos=(100, 100))
EventLoop.window.add_widget(rl) # do_layout() called
self.assertEqual(rl.to_parent(50, 50), (150, 150))
self.assertEqual(rl.to_local(50, 50), (-50, -50))