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

Set the control width of Dropdown by setting the fieldWidth property #5586

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

boutinb
Copy link
Contributor

@boutinb boutinb commented Jun 25, 2024

Add fieldWidth property to Dropdown, to fix the width of the dropdown. If the length of the value is then smaller, it should be elided with '...'. The popup menu should be as wide as necessary so that all values are clearly seen.
A new test Test Dropdown has been added to the Test module.

Fixes jasp-stats/jasp-issues#2404

@JorisGoosen
Copy link
Contributor

Should this be reviewed and merged?

@boutinb boutinb force-pushed the dropDownWithFixedWidth branch 4 times, most recently from f933887 to 4107402 Compare September 9, 2024 10:36
@boutinb
Copy link
Contributor Author

boutinb commented Sep 9, 2024

Should this be reviewed and merged?

Yes it can be reviewed now

This is now easily addable to any qml control by adding the property controlXOffset and applying it to the relevant leftPadding
Copy link
Contributor

@JorisGoosen JorisGoosen left a comment

Choose a reason for hiding this comment

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

Lovely, ive also added auto-aligning for the labels of dropdowns and used it in PrefsUI

@boutinb boutinb merged commit 1c8381c into jasp-stats:development Sep 12, 2024
1 check failed
JorisGoosen added a commit that referenced this pull request Sep 30, 2024
…5586)

* Add fieldWidth property to Dropdown

* let dropdown participate in aligning labelwidths

This is now easily addable to any qml control by adding the property controlXOffset and applying it to the relevant leftPadding

* use new aligning in prefsUI

---------

Co-authored-by: Joris Goosen <Joris@JorisGoosen.nl>
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.

[Feature Request]: Add option to QML dropdown to prevent width from adjusting to longest element name
2 participants