Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] min_size/max_size for window items are cast as a sequence of floats in get_item_configuration #1591

Closed
Atlamillias opened this issue Feb 10, 2022 · 1 comment
Labels
priority: medium medium priority state: ready Fixed/Added and will be present in an upcoming release type: bug bug

Comments

@Atlamillias
Copy link
Contributor

DearPyGui v1.3.1
Operating System: Windows 10

Issue

The list of values returned for min_size and max_size for window items in get_item_configuration are floats. However, add_window, window, and configure_item commands enforce a list/tuple of integers. The type hint for add_window and window also specify sequences of integers.

Example

from dearpygui import dearpygui as dpg


dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()


with dpg.window(min_size=[50, 50], max_size=[500, 500]) as window:
    ...

win_config = dpg.get_item_configuration(window)
print(win_config["min_size"], win_config["max_size"])  # `[50.0, 50.0] [500.0, 500.0]`

Adding the following will result in a SystemError:

# raises `SystemError`
with dpg.window(min_size=win_config["min_size"]):
    ...
@Atlamillias Atlamillias added state: pending not addressed yet type: bug bug labels Feb 10, 2022
@hoffstadt
Copy link
Owner

Fixed in next release!

@hoffstadt hoffstadt added priority: medium medium priority state: ready Fixed/Added and will be present in an upcoming release and removed state: pending not addressed yet labels Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium medium priority state: ready Fixed/Added and will be present in an upcoming release type: bug bug
Projects
None yet
Development

No branches or pull requests

2 participants