Repository navigation
Conversation
Testing elsewhere showed that QPalette() returned an empty palette instead of the one inherited by the GUI from the environment. This caused the dialogs not to be fully themed. Using the GUI application palette explicitly fixed that problem. at least on Linux.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
I believe it regresses it on iOS. |
ann0see
left a comment
There was a problem hiding this comment.
So iOS definitely regresses with this. You could ifdef it...
ann0see
left a comment
There was a problem hiding this comment.
Sorry. should not have approved
I think I'd prefer to understand why first. It shouldn't. |
|
Also just noticed that in dark mode some of the labels in the Settings dialog are still black instead of white. Need a bit of an audit of style specifications. |
It is, I only made it this morning. |
|
Just saw that I locally had a weird state. Maybe that's the cause. |
|
Huh, now it seems to also have this bug on the current main again and TestFlight? |
|
So my PR did not solve it. But I could swear that I could reproduce it working... |
|
Maybe Qt 6.12 regresses it again. |
|
Actually no. It does not. Same issue with 6.11.1. meaning we should probably revert my PR |
|
But the question is then really why does this happen. |
|
Is it broken for every widget or only specific types of widget? (I'm wondering if our custom widgets are the problem or whether it's even basic Qt ones.) |
|
Well I've moved the setting of the palette from the event handler to the @ann0see could you test the latest commit on iOS for the Connect and Chat dialogs? |
|
I also don't know how it varies between Qt versions - my Linux build is on Qt 5.15.8 |
This comment has been minimized.
This comment has been minimized.
|
Follow-up on the new head ( I rebuilt that exact commit with the Qt 6.12.1 native arm64 simulator kit, set the simulator to dark mode, cold-launched the app and opened the Connect dialog. Because the directory was unreachable, I injected test-only rows into a temporary copy so the item text could be measured; the installed build did not have those rows. Measured brightness of the server-name column at first paint:
So the constructor-based palette change does not fix the first-paint colour problem under the same conditions. The explicit item foreground remains the only workaround I have measured to work; it is in my earlier comment, with its caveats. No images attached, and nothing was committed or pushed from this test.
|
|
I'll test myself once I have physical access to my setup |
|
There's obviously more to this than my initial experiments suggest. I've been building with Qt5.15.8. I've now installed the Qt6 available in the distro (Raspbian 12), which is 6.4.2, and built with it, and it doesn't pick up the environment palette at all. |


Short description of changes
This follows on from PR #3999.
With further testing on Pi, I've concluded that
setPalette ( QPalette() );is not correct, asQPalette()does not actually default correctly to the default light/dark theme.Instead it should be
setPalette ( QGuiApplication::palette() );, which works correctly on my Pi, for both the connect and chat dialogs.CHANGELOG: GUI: Inherit light/dark mode theme correctly from environment.
Context: Fixes an issue?
The fix in #3999 was not completely successful on Linux.
Does this change need documentation? What needs to be documented and how?
No, bugfix only
Status of this Pull Request
Ready to test
What is missing until this pull request can be merged?
Specifically need to verify that this works correctly on iOS/iPadOS.
Checklist