mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Select widget (#2501)
* overlay rule * select WIP * select control, made binding description optional * changelog * style tweak * Added constrain * changelog * test fix * drop markup, tidy * tidy * select namespace * tests * docs * Added changed event * changelog * expanded * tests and snapshits * examples and docs * simplify * update reactive attributes * type fix * docstrings * allow renderables * superfluous init * typing fix * optimization * revert optimizations * fixed words * changelog * docstrings * don't need this * changelog * comment * Update docs/widgets/select.md Co-authored-by: Dave Pearson <davep@davep.org> * review changes * review updates --------- Co-authored-by: Dave Pearson <davep@davep.org>
This commit is contained in:
@@ -447,3 +447,15 @@ def test_split_horizontal_negative():
|
||||
Region(10, 5, 22, 14),
|
||||
Region(10, 19, 22, 1),
|
||||
)
|
||||
|
||||
|
||||
def test_translate_inside():
|
||||
# Needs to be moved up
|
||||
assert Region(10, 20, 10, 20).translate_inside(Region(0, 0, 30, 25)) == Region(
|
||||
10, 5, 10, 20
|
||||
)
|
||||
|
||||
# Already inside
|
||||
assert Region(10, 10, 20, 5).translate_inside(Region(0, 0, 100, 100)) == Region(
|
||||
10, 10, 20, 5
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user