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 macOS slider styling in preferences dialog #11647

Merged
merged 1 commit into from Jun 24, 2023

Conversation

m0dB
Copy link
Contributor

@m0dB m0dB commented Jun 11, 2023

This PR fixes several issues with sliders in the preferences dialog:

  • the handle is semi-transparent
  • the groove is not correctly centered vertically in relation to the widgets left and right of it
  • the handle is cut off at the top (the last two issues seem to be a consequence of the slider being higher than the space reserved for it in the layout)
  • the style of the handle seems based on older versions of macOS.

The fix simply uses a different style sheet for these sliders, that fixes all these issues (the look is based on the sliders as can be found in the macOS system settings).

The PR also includes obj-c code to check if macOS is set up to use dark or light appearance, and a different style sheet is used accordingly.

This is a very non-invasive fix so I don't see any risk of regression.

@ronso0 ronso0 linked an issue Jun 12, 2023 that may be closed by this pull request
@ronso0 ronso0 changed the title fix issue 11604 (macOS slider styling in preferences dialog) fix macOS slider styling in preferences dialog Jun 12, 2023
@ronso0 ronso0 added this to the 2.4.0 milestone Jun 12, 2023
Copy link
Contributor

@ferranpujolcamins ferranpujolcamins left a comment

Choose a reason for hiding this comment

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

Thank you for taking this bug @m0dB.

I've just added one change request, otherwise looks good.

src/preferences/dialog/dlgpreferences.cpp Outdated Show resolved Hide resolved
@m0dB m0dB force-pushed the issue-11604-prefs-slider-style branch from 5d65481 to 923c361 Compare June 23, 2023 23:43
@github-actions github-actions bot added the build label Jun 23, 2023
…op) on macos for both dark and light mode and properly align the beatGridAlpha slider with the other sliders
@m0dB m0dB force-pushed the issue-11604-prefs-slider-style branch from 923c361 to 8fed641 Compare June 24, 2023 00:51
@ferranpujolcamins ferranpujolcamins merged commit a6e6fdb into mixxxdj:2.4 Jun 24, 2023
13 checks passed
@foss-
Copy link
Contributor

foss- commented Jun 24, 2023

Looking great in 2.4-beta-30-gbd3a6f584a
Thanks so much for your work 🚀

Screenshot 2023-06-24

@m0dB
Copy link
Contributor Author

m0dB commented Jun 24, 2023

Thanks. My pleasure!

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.

Mixxx Preferences: Sliders have transparency
4 participants