Add Widget Zoo, fix various widget consistency issues#5478
Merged
Conversation
aseprite-bot
left a comment
Collaborator
There was a problem hiding this comment.
clang-tidy made some suggestions
28cb534 to
d5ec0e3
Compare
aseprite-bot
left a comment
Collaborator
There was a problem hiding this comment.
clang-tidy made some suggestions
|
|
||
| // Used to validate the text given to the widget during creation in widget_loader, to validate the | ||
| // data. | ||
| bool m_firstText = false; |
Collaborator
There was a problem hiding this comment.
warning: member variable 'm_firstText' has protected visibility [misc-non-private-member-variables-in-classes]
bool m_firstText = false;
^d5ec0e3 to
a6ed6c0
Compare
aseprite-bot
left a comment
Collaborator
There was a problem hiding this comment.
clang-tidy made some suggestions
a6ed6c0 to
e2d677e
Compare
dacap
requested changes
Nov 11, 2025
dacap
left a comment
Member
There was a problem hiding this comment.
It's nice to have a place to test widgets/themes and scales. I've reviewed with some comments, the most important one is a regression/bug in ExprEntry.
e2d677e to
b3fcccd
Compare
aseprite-bot
left a comment
Collaborator
There was a problem hiding this comment.
clang-tidy made some suggestions
81f8f23 to
ad93094
Compare
Member
Author
|
Rebased, updated and removed some stray things (textbox without view), ready for the full review. |
ad93094 to
ecaf66a
Compare
Member
|
LGTM 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new command, WidgetZoo, to launch a window containing most of the usable widgets:
This is useful to check the consistency of the widgets through different states and variations (there's a toggle for normal/disabled/readonly), and to see how things look with different themes at a glance (there's a theme selector on the top-right).
The work creating this made a few issues come up and those have also been fixed in this PR:
ExprEntrywidgets could be created with any "text" property through XML and that would remain until it received and lost focus and was thus validated, it now performs a validation when the first text is set.TextEdit,FilenameFieldandFontEntrynow have areadonlymode.FontEntrynow disables the size dropdown when there's no font set, instead of just showing an empty popup (shouldn't be an issue since in most places we show this the font is already pre-set to Aseprite by default anyway).TextEditnow has the correct colors for disabled and readonly, and now supports placeholders, although they cannot be multi-line and do not affect the view/scrolling (if there's a place where we need to use this, then it can be tackled, but the implementation would add complexity that might not be necessary atm)EntryandTextEdithas been improved when switching through the different states:mini_buttonnot using the disabled text colorSetting this as draft to validate that these are the changes we want and the design of the window itself (it's very "developer-y" but since it's a hidden command you can only access through the runner or scripting I think that's fine IMO).
Only widget that isn't here is the
splitter, ran into some weird issues when trying to use it relating to size, will look into it.