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

mvDrawRect: Removed the default for corner_colors #2274

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

v-ein
Copy link
Contributor

@v-ein v-ein commented Feb 1, 2024

so that it doesn't break the old color arguments


name: Pull Request
about: Create a pull request to help us improve
title: mvDrawRect: Removed the default for corner_colors so that it doesn't break the old color arguments
assignees: @hoffstadt


Description:
The commit that added corner_colors to draw_rectangle also set it by default to all-white colors. Unfortunately this breaks old arguments named color_yyy_zzz, since the default for corner_colors overrides whatever is specified in color_yyy_zzz.

Concerning Areas:
I'm not sure how much of a problem it is to have a default of None.

If you'd prefer to keep the default in dearpygui.py, there's another way to resolve this issue. We can parse corner_colors before color_yyy_zzz. This would involve changes in mvDrawings.cpp rather than dearpygui.py. Please let me know if that's the way to go.

@v-ein v-ein requested a review from hoffstadt as a code owner February 1, 2024 07:40
@hoffstadt hoffstadt merged commit c58d755 into hoffstadt:master Feb 7, 2024
4 checks passed
@SamuMazzi
Copy link
Contributor

Why didn't you change also the default parameter in mvAppItem.cpp?

@v-ein
Copy link
Contributor Author

v-ein commented Feb 7, 2024

Why didn't you change also the default parameter in mvAppItem.cpp?

Good point. Not that it affected anything (it seems to be purely for doc), but yeah, it might be a good idead to change it, too. Well, in fact, if you don't specify a value for corner_colors, a list of all 255's describes the default pretty well 😂.

@SamuMazzi
Copy link
Contributor

Yeah it doesn't break anything, but that's the "source file" for the documentation and all the .py files so if you don't change it, next time someone will build it it's gonna set the old value again (as far as I know at least)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants