Clarify grid autobreak behavior
This commit is contained in:
@@ -107,6 +107,20 @@ def test_grid_auto_reduces_columns_to_parent_width(dpg_context: None) -> None:
|
||||
assert len(children[0]) == 2
|
||||
assert len(children[1]) == 3
|
||||
assert [len(_children(row)[1]) for row in children[1]] == [2, 2, 1]
|
||||
assert 0 < get_gauge_state("narrow_metric_0").config.width < 190
|
||||
|
||||
|
||||
def test_grid_auto_columns_uses_available_width(dpg_context: None) -> None:
|
||||
with dpg.window(label="Auto", width=640), dpgg.gauge_grid(
|
||||
tag="auto_grid", columns="auto", min_column_width=180
|
||||
):
|
||||
for index in range(7):
|
||||
dpgg.digital_gauge(tag=f"auto_metric_{index}", value=index, height=60)
|
||||
|
||||
children = _children("auto_grid")
|
||||
assert len(children[0]) == 3
|
||||
assert len(children[1]) == 3
|
||||
assert [len(_children(row)[1]) for row in children[1]] == [3, 3, 1]
|
||||
|
||||
|
||||
def test_grid_routes_panels_without_stealing_panel_children(dpg_context: None) -> None:
|
||||
|
||||
Reference in New Issue
Block a user