step 3: add widget shell sizing and frame pump

This commit is contained in:
2026-05-22 18:33:45 +02:00
parent 13b6a1e65b
commit 743a82f796
14 changed files with 568 additions and 12 deletions

27
examples/sizing_window.py Normal file
View File

@@ -0,0 +1,27 @@
from typing import Any
import dearpygui.dearpygui as _dpg
import dpg_map as dpgm
dpg: Any = _dpg
def main() -> None:
dpg.create_context()
dpg.create_viewport(title="dpg-map window sizing", width=900, height=600)
with (
dpg.window(label="Fill Window", width=-1, height=-1),
dpgm.map_widget(tag="map-window", width=-1, height=-1),
):
dpgm.add_marker("center", lat=0.0, lon=0.0)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
if __name__ == "__main__":
main()