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

FitPadding Style target out of range #1220

Closed
JackNewman12 opened this issue Sep 5, 2021 · 0 comments
Closed

FitPadding Style target out of range #1220

JackNewman12 opened this issue Sep 5, 2021 · 0 comments
Labels
priority: high high priority state: ready Fixed/Added and will be present in an upcoming release type: bug bug

Comments

@JackNewman12
Copy link

Version of Dear PyGui

Version: 0.8.64
Operating System: Windows 10,

My Issue/Question

I cannot seem to set dpg.mvPlotStyleVar_FitPadding. It also applies to a few more of the "2 value" plot theme settings but I haven't created a list of all of them.

To Reproduce

Minimal code to reproduce:

from dearpygui import dearpygui as dpg

with dpg.theme(default_theme=True) as t:
    dpg.add_theme_style(dpg.mvPlotStyleVar_LineWeight, 2, category=dpg.mvThemeCat_Plots)
    dpg.add_theme_style(dpg.mvPlotStyleVar_FitPadding, x=0.05, y=0.05, category=dpg.mvThemeCat_Plots)

dpg.start_dearpygui()

Which then crashes:

Exception: Error: [1000] Message:       Style target out of range.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Jack\Documents\guitest\fitpadding.py", line 5, in <module>
    dpg.add_theme_style(dpg.mvPlotStyleVar_FitPadding, x=0.05, y=0.05, category=dpg.mvThemeCat_Plots)
  File "C:\Users\Jack\Documents\guitest\ENV\lib\site-packages\dearpygui\dearpygui.py", line 5308, in add_theme_style
    return internal_dpg.add_theme_style(target, x, y, label=label, user_data=user_data, use_internal_label=use_internal_label, id=id, parent=parent, category=category)
SystemError: <built-in function add_theme_style> returned a result with an error set

I have tried a bunch of different ways of inputting the data (tuples / with or without the category / etc) but it never seems happy.

Hopefully this is not just user error,, although if it is perhaps some more demo code would help.
Currently loving the library! Thanks for all the hard work.

@hoffstadt hoffstadt added type: bug bug state: pending not addressed yet and removed bug labels Oct 13, 2021
@hoffstadt hoffstadt added priority: high high priority and removed state: pending not addressed yet labels Nov 19, 2021
@hoffstadt hoffstadt added the state: ready Fixed/Added and will be present in an upcoming release label Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high high 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