mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Horizontal width auto (#1155)
* Improvements to width:auto HorizontalLayout * Fix HorizontalLayout.get_content_width * Horizontal width auto improvement * Removing some printxz * Update snapshot for horizontal layout width auto dock
This commit is contained in:
@@ -2,9 +2,11 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
# These paths should be relative to THIS directory.
|
||||
WIDGET_EXAMPLES_DIR = Path("../../docs/examples/widgets")
|
||||
LAYOUT_EXAMPLES_DIR = Path("../../docs/examples/guide/layout")
|
||||
STYLES_EXAMPLES_DIR = Path("../../docs/examples/styles")
|
||||
SNAPSHOT_APPS_DIR = Path("./snapshot_apps")
|
||||
|
||||
|
||||
# --- Layout related stuff ---
|
||||
@@ -29,6 +31,10 @@ def test_horizontal_layout(snap_compare):
|
||||
assert snap_compare(LAYOUT_EXAMPLES_DIR / "horizontal_layout.py")
|
||||
|
||||
|
||||
def test_horizontal_layout_width_auto_dock(snap_compare):
|
||||
assert snap_compare(SNAPSHOT_APPS_DIR / "horizontal_auto_width.py")
|
||||
|
||||
|
||||
def test_vertical_layout(snap_compare):
|
||||
assert snap_compare(LAYOUT_EXAMPLES_DIR / "vertical_layout.py")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user