Clarify grid autobreak behavior
This commit is contained in:
@@ -9,7 +9,7 @@ def main() -> None:
|
||||
dpg.create_context()
|
||||
try:
|
||||
with dpg.window(label="Grid layout", width=820, height=620):
|
||||
dpg.add_text("Three-column grid: fixed column cap, automatic rows")
|
||||
dpg.add_text("Max columns: columns=3 wraps onto new rows after every third gauge")
|
||||
with dpgg.gauge_panel(label="Wide panel", width=-1, height=270), dpgg.gauge_grid(
|
||||
columns=3, min_column_width=190
|
||||
):
|
||||
@@ -26,9 +26,10 @@ def main() -> None:
|
||||
dpgg.battery_gauge(tag="grid_battery", label="Battery", value=74, height=160)
|
||||
|
||||
dpg.add_spacer(height=8)
|
||||
dpg.add_text("Narrow panel: columns=3 auto-reduces to avoid horizontal scrolling")
|
||||
with dpgg.gauge_panel(label="Narrow panel", width=390, height=250), dpgg.gauge_grid(
|
||||
columns=3, min_column_width=180
|
||||
dpg.add_text("Autobreak: columns='auto' chooses columns from available width")
|
||||
with (
|
||||
dpgg.gauge_panel(label="Autobreak narrow panel", width=430, height=285),
|
||||
dpgg.gauge_grid(columns="auto", min_column_width=180),
|
||||
):
|
||||
for index, value in enumerate((18, 42, 67, 91, 55), start=1):
|
||||
dpgg.digital_gauge(
|
||||
|
||||
Reference in New Issue
Block a user