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: add space after checkbox in macintosh theme #902

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

swiftqwq
Copy link
Member

@swiftqwq swiftqwq commented Jul 6, 2021

Description

Update RichTextCheckBox to add extra space after checkbox in macintosh theme.

Related Issues / Pull Requests

fix #871

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate)

Screen Shot 2021-07-06 at 7 32 41 PM

Checklist

  • If the key of a setting is changed, the old attribute is updated or it is resolved in SettingsUpdater.
  • If there are changes of the text displayed in the UI, they are wrapped in tr() or QCoreApplication::translate().
  • If needed, I have opened a pull request or an issue to update the documentation.
  • If these changes are notable, they are documented in CHANGELOG.md.

Additional text

After changing theme, you need to restart CP Editor to make this work.

@swiftqwq swiftqwq requested review from ouuan and coder3101 July 6, 2021 11:43
neko-para
neko-para previously approved these changes Jul 6, 2021
@ouuan
Copy link
Member

ouuan commented Jul 6, 2021

@swift-zym Can you test removing this based on master:

setStyleSheet("QCheckBox{spacing:4px;}");

@ouuan
Copy link
Member

ouuan commented Jul 6, 2021

If #902 (comment) works, use that solution;
else if 4d784c3 works, use it;
if neither of them works, revert 4d784c3.

@swiftqwq
Copy link
Member Author

swiftqwq commented Jul 7, 2021

If #902 (comment) works, use that solution;
else if 4d784c3 works, use it;
if neither of them works, revert 4d784c3.

Neither of them work.

@ouuan
Copy link
Member

ouuan commented Jul 7, 2021

What is the value of style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing) in macintosh theme?

@swiftqwq
Copy link
Member Author

swiftqwq commented Jul 7, 2021

What is the value of style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing) in macintosh theme?

2

@ouuan
Copy link
Member

ouuan commented Jul 7, 2021

Does 4d784c3 add a spacing, though not necessarily wide enough?

@ouuan
Copy link
Member

ouuan commented Jul 7, 2021

I just think it's not very good to hardcode a spacing size for a specific theme, as the theme may change in the future 🤔

@swiftqwq
Copy link
Member Author

swiftqwq commented Jul 7, 2021

Does 4d784c3 add a spacing, though not necessarily wide enough?

No....

@swiftqwq
Copy link
Member Author

swiftqwq commented Jul 7, 2021

I just think it's not very good to hardcode a spacing size for a specific theme, as the theme may change in the future 🤔

I just can't find better solution for it 😢

@neko-para
Copy link
Contributor

I think it's ok. If really want to move it out, maybe add support for os-specified param in setting 🤔

@ouuan
Copy link
Member

ouuan commented Jul 7, 2021

Or we can try to find a different way to implement #733.

@neko-para
Copy link
Contributor

Or we can try to find a different way to implement #733.

Maybe a widget contains a HBoxLayout, with a QCheckBox and a clickable label? It should work.

@coder3101
Copy link
Member

Or we can try to find a different way to implement #733.

Maybe a widget contains a HBoxLayout, with a QCheckBox and a clickable label? It should work.

It will work, but I am thinking 🤔 if it's a macOS Qt Style bug, instead of code change we can report/wait for Qt to fix it.

@ouuan
Copy link
Member

ouuan commented Jul 8, 2021

if it's a macOS Qt Style bug, instead of code change we can report/wait for Qt to fix it.

This is a custom widget, so we need to find out if it's a Qt bug or our own fault.

@stale
Copy link

stale bot commented Aug 7, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issues label Aug 7, 2021
@ouuan ouuan added the work in progress The work has been started and is in progress. label Aug 7, 2021
@ouuan ouuan removed the stale Inactive issues label Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress The work has been started and is in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lack space between checkbox and text in macintosh theme
4 participants