-
Notifications
You must be signed in to change notification settings - Fork 283
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
qt: Support macOS Dark mode #154
Conversation
@laanwj you wrote this code 6 years ago, maybe you could review this PR. |
@goums |
I think it would be good to post some screenshots how this looks in non-dark mode. |
Sure @jonasschnelli MacOS Big Sur - Light Mode - Before PR: MacOS Big Sur - Light Mode - After PR: It looks exactly the same to me, with icon colorization active/inactive on light mode. |
Thanks, I've read the discussion, it seems MacOS had no theme styling options at that time, as you mentioned it (bitcoin/bitcoin#5493 (comment)). That's probably why the |
Concept ACK. Just one boolean to fix all the things! |
@goums IIUC, you use the latest Homebrew's Qt, right? |
I don't think that all macOS users ignore |
I installed QT Creator from their website, as mentioned in the readme:
Yes sure, my idea was to fix the glitches step by step. Then we could revert the use of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK c2db537
The PR Colorizes icons as White
on macOS using Dark Mode
. Icons are Black
when using Light Mode
.
Both steps could be done in this pr as two different commits, no?
For the second commit? Although, it will require to test builds with depends. |
Yes, for the reason @jonasschnelli says. Somehow it didn't look good on MacOS—which was all-white at the time—so black icons looked best. This may have changed now, thank you for working on dark mode support. |
@hebasto, as the plist file is not in the Anyway, I've updated it so that all deploy can benefit from darkmode now, depending on user "System Preferences".
However, there is still some glitches on the TabWidget: I don't know if this is acceptable or not? This bug is coming directly from |
#177 forces Fusion qt style on older versions of Qt. If we are sticking with Qt 5.9.8 as the depends package for the next release, then the next release will use Fusion Qt style. |
That is orthogonal to this PR changes. See QTBUG-86513 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested 92369a1 with depends -- no visual changes as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach ACK 92369a1, tested on macOS Big Sur 11.2.1 (20D74):
- Homebrew's Qt 5.15.2:
- running
bitcoin-qt
-- dark mode works fine - installing from
Bitcoin-Core.dmg
-- dark mode works fine
- running
- cross-compiling with depends -- no changes, as expected
I think only commits must be sorted out (or squashed) before this PR gets ready to be merged.
92369a1
to
303cfc6
Compare
Thanks for the full review @hebasto
Sorry about that, I've removed the merge commit and rebase the branch instead, should be ok now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the commit message in 303cfc6 be rewritten so it explains why this is possible. For release builds we are still using a version of Qt that doesn't properly support dark mode (as far as I'm aware support landed in 5.12.x). It also wasn't really the case that dark mode wasn't allowed before, you just had to build using a newer Qt. i.e this is master using dark mode: If we now properly support dark mode, this note should be removed from doc/release-notes.md as part of this change:
Also, the PR body needs to be updated it's included in the merge), because it's no longer correct. i.e:
|
I retract my ACK. These changes do not work on macOS Mojave 10.14.6 (18G8022 ) + Homebrew's Qt 5.15.2: UPDATE: probably these changes need to be documented properly? |
@hebasto, I'm running on macOS BigSur, and I'm struggling to find a way to test on macOS Mojave... Do you use VirtualBox to run multiple macOS versions?
yes sure |
Ok, thanks for your explanations @fanquake .
Yes, I'll update that too. |
Will the following work: --- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -51,9 +51,9 @@ Core should also work on most other Unix-like systems but is not as
frequently tested on them. It is not recommended to use Bitcoin Core on
unsupported systems.
-From Bitcoin Core 0.22.0 onwards, macOS versions earlier than 10.14 are no
-longer supported. Additionally, Bitcoin Core does not yet change appearance
-when macOS "dark mode" is activated.
+From Bitcoin Core 22.0 onwards, macOS versions earlier than 10.14 are no
+longer supported. Additionally, the appearance switching (light/dark) is
+not supported for maOS 10.14.
Notable changes
=============== ? |
So is it just |
With this PR:
Yes.
Partially. Appearance switching while Bitcoin Core is running does not cause automatic switching of icons.
On 10.14 only icons do not change appearance. Being a non-English native speaker, I'll appreciate better wording suggestions to express the ideas above :) |
@hebasto this is how I would put it, just a suggestion. -From Bitcoin Core 22.0 onwards, macOS versions earlier than 10.14 are no
-longer supported. Additionally, the appearance switching (light/dark) is
-not supported for maOS 10.14.
+From Bitcoin Core 22.0 onwards, macOS versions earlier than 10.14 are no
+longer supported. Additionally, switching between light and dark mode is
+not supported on macOS 10.14. |
In that case I'd just drop the note entirely. It's no longer worth-while to call out in the release notes. |
Could you implement @fanquake's suggestion to get this PR ready to merge? |
Thanks @hebasto and @jarolrod for the updates and suggestions.
I agree with @fanquake comment: as user usually don't switch light/dark mode to test the application, it will work just fine for most people by rendering correctly on start time depending on their settings.
Done |
@goums linter is failing: https://cirrus-ci.com/task/4605693853433856?command=lint#L916 diff --git a/doc/release-notes.md b/doc/release-notes.md
@@ -55,2 +55 @@ From Bitcoin Core 0.22.0 onwards, macOS versions earlier than 10.14 are no
+longer supported.
^---- failure generated from test/lint/lint-whitespace.sh You can just place this warning on one line now. Doesn't have to go on two separate lines just to accommodate |
doc/release-notes.md
Outdated
@@ -52,8 +52,7 @@ frequently tested on them. It is not recommended to use Bitcoin Core on | |||
unsupported systems. | |||
|
|||
From Bitcoin Core 0.22.0 onwards, macOS versions earlier than 10.14 are no | |||
longer supported. Additionally, Bitcoin Core does not yet change appearance | |||
when macOS "dark mode" is activated. | |||
longer supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing trailing space is enough :)
longer supported. | |
longer supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc/release-notes.md
Outdated
From Bitcoin Core 0.22.0 onwards, macOS versions earlier than 10.14 are no | ||
longer supported. Additionally, Bitcoin Core does not yet change appearance | ||
when macOS "dark mode" is activated. | ||
From Bitcoin Core 0.22.0 onwards, macOS versions earlier than 10.14 are no longer supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(see bitcoin/bitcoin#20223)
From Bitcoin Core 0.22.0 onwards, macOS versions earlier than 10.14 are no longer supported. | |
From Bitcoin Core 22.0 onwards, macOS versions earlier than 10.14 are no longer supported. |
56ed4ce
to
dc4551c
Compare
ok, sorry about that ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK dc4551c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK dc4551c
@fanquake Anything left to do here? |
I haven't tested this, but I think it can be merged. |
Do you mind testing bitcoin/bitcoin#19817 (in context of bitcoin/bitcoin#19817 (comment))? |
Allow icons to be colorized on macOS to support native Dark mode color scheme.
Rendering on macOS Big Sur before PR:

Rendering on macOS Big Sur after PR:

Light mode stay visually unchanged.
Note, that this currently only affect the build from source, as the macos dmg includes an attributes to force light color scheme on macos windows (see bitcoin/bitcoin#14593).But once all glitches are fixed, we will be able to remove this temporary fix.Edit: this PR is know including the removal of
NSRequiresAquaSystemAppearance
on Info.plist file so that the color fix is apply to every build.Linked issues: #68 #136