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

Fix ColorPicker hide save/load swatches for presets_visible #101913

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

Giganzo
Copy link
Contributor

@Giganzo Giganzo commented Jan 22, 2025

Fixes: #101908

Hides the menu button for loading and saving swatches when presets_visible is false.

This PR does not fix "You can load a new palette even if can_add_swatches = false" mentioned in the issue

@Giganzo Giganzo requested a review from a team as a code owner January 22, 2025 14:16
@AThousandShips AThousandShips added this to the 4.4 milestone Jan 22, 2025
AThousandShips
AThousandShips previously approved these changes Jan 22, 2025
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KoBeWi
Copy link
Member

KoBeWi commented Jan 22, 2025

If you hide presets while the section is unfolded, the unfolded controls stay visible:

godot.windows.editor.dev.x86_64_yNEbPD5hmu.mp4

Also disabling presets does not hide their parent container, leaving extra margin.

A more robust solution would be putting all swatches-related nodes into their own VBoxContainer and toggling its visibility instead of individual controls.

@Giganzo
Copy link
Contributor Author

Giganzo commented Jan 22, 2025

Moved swatch related controls into a VBoxContainer as suggested.

@AThousandShips AThousandShips dismissed their stale review January 22, 2025 16:45

New changes

@Repiteo Repiteo merged commit 3c3ff85 into godotengine:master Jan 28, 2025
19 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jan 28, 2025

Thanks!

@Giganzo Giganzo deleted the color-hide-button branch January 31, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ColorPicker save/load swatches menu isn't hidden with presets_visible = false
4 participants