-
Notifications
You must be signed in to change notification settings - Fork 32
light/dark mode themed icons #659
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
Conversation
…nges defined for light & dark
Not sure why the build scripts are failing on the icon resource build make: *** No rule to make target 'res/icons/dark/svg/done.svg', needed by 'qrc_icons.cpp'. Stop. |
I just pulled down the pull release and tried to build locally and got the
same message. If I look in res/icons/light/svg/ I see a done.svg but I
don't have one in res/icons/dark/svg/
Looks like I am missing these files in the dark folder:
baseline-stop.svg
connect.svg
disconnect.svg
done.svg
new-window.svg
…On Tue, Apr 29, 2025 at 9:41 AM Kyle Boyle ***@***.***> wrote:
*kyleboyle* left a comment (foldynl/QLog#659)
<#659 (comment)>
Not sure why the build scripts are failing on the icon resource build
make: *** No rule to make target 'res/icons/dark/svg/done.svg', needed by
'qrc_icons.cpp'. Stop.
—
Reply to this email directly, view it on GitHub
<#659 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUEEMXVLDSFLCMBSNBBNR2T236FRFAVCNFSM6AAAAAB4DDYWLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMZZGE4TAMZYGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
thanks, seems git didn't handle all the renaming properly |
Yup that got it. Builds and looks fine now. |
Thanks. I have to find time to test it. Unfortunately, I recently noticed that QT under Windows automatically chooses a theme (Light/Dark) based on the Windows theme (Light/Dark). And I don't know how this change will behave under Windows. |
Interesting. Well this type of icon theme is different from a colour palette so as long as the QLog colour theme state is in sync with what is instructed by windows then it should work as expected. |
I see what you are saying about windows now. In windows the colour schemes in QLog equate to windows colours = light, QLog dark palette = dark. So if the user has their windows theme set as a dark mode type theme, then the icons for qlog light theme will not work well. I think I can handle this by choosing the icon set based on the brightness of the current palette's text colour. |
yes, that's exactly what I'm talking about. I found this out recently. I don't normally use dark mode on Windows, but recently I was showing someone QLog with enabled Windows dark mode and I was surprised that QLog was dark even though QLog switched light. It should be a feature of the latest QT 6.x. Just tested and Flatpak with 6.8 has the same behavior. So the question is whether the light/dark mode switch should be present when QT is 6.x. I think that it should be removed and left to the operating system settings. |
I was thinking of this approach where we offer both options... convert the toggle button to a single icon button with an action menu that presents 3 options:
We can get the explicit palette values for the current qt default light theme and then rely on the os to provide the default palette for the native theme. Then the icons can be set depending on the state of the colours. I found an informative discussion about detecting light/dark here: https://stackoverflow.com/questions/75457687/detect-dark-application-style-theme-of-currently-used-desktop-in-qt |
I have a proof of concept working: Kapture.2025-05-08.at.23.04.55.webmI need to clean it up, including the state saved in activity settings etc |
…icons # Conflicts: # ui/BandmapWidget.ui # ui/QSODetailDialog.ui
Changes complete. Would be best to get it tested on other platforms. It works as in the above screen recording where QLog provides a light and dark theme and the user can also use the default native style. The icon theme used is based on if the text color should be dark or light. |
@kyleboyle sorry I'm getting to this now. I've been fully focused on the Upload/Download rework and the big change in QLog paramaters. I tried your change and noticed a few side effects that are caused by your change.
I don't know how to solve the points above right now, but at the very least, point 1 is a obstacle to merge it. Point 3 is something that's inconvenient for development, but it doesn't affect the user. But to be honest, WYSIWYG design is a big advantage of QT Designer/Creator. Therefore, I think we should, for now, use only the theme-switching logic from this PR without icon changes. Given the finding that Qt automatically switches themes under Qt 6.x, this change will be necessary. |
Makes sense. I think the icon experience we currently have is not ideal because on macos there aren't menu icons and many of the button icons also don't show. In windows most of the menu icons also don't show. On linux the icons are mixed between system theme and QLog provided. In any case, this PR is my attempt to show a better way to display icons consistently cross-platform and cross-theme. The missing menu icons could be fixed by defining our own icons instead of relying on system theme. |
Could the icons be pulled out from the UI and put in code so it could defined with a fallback. So on OS's like MacOS where the icons don't exist they could use ones provided if not it would use the system.
|
My next step for this change is to separate out the theme selection and icon changes as suggested by Ladislav, hoping to get the theme changes themselves in. Then the next step is to tinker with the icon part. I didn't explore if it was possible to extend existing themes, etc. I would hate to have to programmatically create an icon object for every place there is an icon used. |
I'm closing for now. see #718 and I will continue to ruminate on the icon stuff. |
Example:
Kapture.2025-04-29.at.10.59.36.webm