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

Sprite Show CheckBox Labels #172

Merged
merged 2 commits into from
Aug 29, 2020
Merged

Sprite Show CheckBox Labels #172

merged 2 commits into from
Aug 29, 2020

Conversation

RobertBColton
Copy link
Contributor

@RobertBColton RobertBColton commented Aug 29, 2020

This fixes the show checkboxes on the sprite form so you can click the label to toggle the checkbox. I removed the second label and added the text directly to the checkbox. Then I used setLayoutDirection to put the label to the left of the checkbox like fundies had it. This does not affect the text layout direction according to the documentation so it should not interfere with i18n here.
https://doc.qt.io/qt-5/qwidget.html#layoutDirection-prop

Copy link
Member

@JoshDreamland JoshDreamland left a comment

Choose a reason for hiding this comment

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

This is great, until it turns out it breaks Arabic text layouts and now we need to update it.

  1. Why is so much code required to create and maintain checkboxes?
  2. Why isn't this handled by the ui file?
  3. Can we wrap it in a helper to avoid needing to change fifty files later?

@RobertBColton
Copy link
Contributor Author

RobertBColton commented Aug 29, 2020

No, I have no idea why fundies wanted to put the label before the checkbox, but that's why it's so messed up. My other pull request moves this shit to the XML. Regardless, the way fundies did it with a separate label makes the label not toggle the checkbox. The way I just did it, with RightToLeft makes it always like Arabic, so regardless of the sprite form direction, the checkbox is always to the right of the label. Instead of deleting his extra labels, I could have connected them to the checkbox, but that's even more insane and doesn't help us.

@RobertBColton RobertBColton changed the title Sprite Show Layout Sprite Show CheckBox Labels Aug 29, 2020
@RobertBColton RobertBColton merged commit edbd2cf into master Aug 29, 2020
@RobertBColton RobertBColton deleted the sprite-show-layout branch August 29, 2020 18:00
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.

2 participants