-
Notifications
You must be signed in to change notification settings - Fork 304
Use "fusion" style on macOS Big Sur with old Qt #177
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
@jonasschnelli @laanwj @MarcoFalke As the upcoming 0.21 release is the first one after macOS Big Sur release, do you mind considering to backport this change into the 0.21 branch in order to ship the usable binaries to Big Sur users? |
Why is there the version check for Qt? I see the same issue with Qt 5.12 on Big Sur. Also checking for "macOS 11" is spurious. Do we need the version checks at all? Why don't just apply this always on macOS? |
This change, actually, is intended to fix visual quality for builds with depends, including shipped releases.
With the latest Homebrew's Qt 5.15.2 the native macOS style looks much better.
Not sure if I understand you correctly. Do you mind elaborating your comment?
Many (most?) macOS users prefer the native macOS style, and the "fusion" does not look native on macOS. |
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.
Concept ACK
I applied this patch to the rc5 source code to see how it would react on macOS Big Sur 11.1 with bitcoin-qt
built with Qt 5.9.8
.
The name check does not work:
if (QSysInfo::prettyProductName().startsWith("macOS 11"))
Removing this check successfully allows the Qt Fusion Style to appear. I'll investigate what's wrong with the naming.
Branch: 9f50395
Qt Fusion Style fails to appear
The "macintosh" style is broken on macOS Big Sur at least for Qt 5.9.8.
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 4e1154d
Qt Fusion successfully shows. Tested with patched rc5 source code on macOS Big Sur with Qt 5.9.8
Yes: Lines 470 to 475 in 4e1154d
With Qt 5.14 the "macintosh" style looks not ideal, but usable. |
@@ -466,6 +467,13 @@ int GuiMain(int argc, char* argv[]) | |||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); | |||
#endif | |||
|
|||
#if (QT_VERSION <= QT_VERSION_CHECK(5, 9, 8)) && defined(Q_OS_MACOS) |
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.
Based on the linked Qt bug, this version check appears wrong?
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.
This version check is correct because #136 concerns Qt compiled on macOS with depends
. Compiling with depends
builds bitcoin-qt
with Qt 5.9.8
. See: Qt Depends Package
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.
Based on the linked Qt bug, this version check appears wrong?
The link to Qt bug removed from the OP. It is possible that version check could be improved, but I do not know for sure from which Qt version widgets are quite usable (I do not even say about fixing all bugs).
The recent Homebrew's Qt versions look decent (but not ideal). And this PR goal is to fix GUI look while building with depends (including gitian binary).
@@ -466,6 +467,13 @@ int GuiMain(int argc, char* argv[]) | |||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); | |||
#endif | |||
|
|||
#if (QT_VERSION <= QT_VERSION_CHECK(5, 9, 8)) && defined(Q_OS_MACOS) | |||
const auto os_name = QSysInfo::prettyProductName(); | |||
if (os_name.startsWith("macOS 11") || os_name.startsWith("macOS 10.16")) { |
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.
Perhaps it should apply to 12+ as well, though probably the issue will be long-gone by then
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.
I think this is fine as is. This is meant to be a patch until the Qt version is bumped up from 5.9.8, not a permanent fix. Presumably, we will get the Qt version bumped up before there is a macOS 12.
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.
Perhaps it should apply to 12+ as well, though probably the issue will be long-gone by then
Did not test 10.12, but there are no such visual issues on Catalina 10.15.7 (19H114) with the recent 0.21.0 release.
I believe the "macintosh" style is broken on macOS Big Sur only.
UPDATE: v0.21.0 looks on Mojave 10.14 fine.
Btw, there is an alternative to this PR. It is reverting of bitcoin/bitcoin#16578. Then it would be possible to pass cc @achow101 |
NACK. The details will become clear soon. |
Users should not need to pass options. |
run appveyor (will need to be rerun before merge) |
review ACK 4e1154d can't test |
So nice to see we're finally going to support MacOS dark mode. |
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 ACK 4e1154d
The "macintosh" style is broken on macOS Big Sur at least for Qt 5.9.8. Github-Pull: #bitcoin-core/gui#177 Rebased-From: 4e1154d
Backported in bitcoin/bitcoin#20901 |
77833a3 Revert "qt: Use "fusion" style on macOS Big Sur with old Qt" (Hennadii Stepanov) Pull request description: This PR reverts workaround introduced in #177. After bumping Qt version in depends to 5.12.10 in bitcoin/bitcoin#21376, there are no reasons to use the Fusion style on macOS. ACKs for top commit: leonardojobim: tACK 77833a3. Tested on macOS Big Sur v11.2.3 jarolrod: ACK 77833a3 Talkless: utACK 77833a3 Tree-SHA512: f704f2027dd380dfc604231e3606a036a8be891aeeddf643c474131014fa080e123b42836ac643a2064fe7a5a018fa8b9aa61a31f9da1d15880de6a36c4c0d54
The "macintosh" style is broken on macOS Big Sur at least for Qt 5.9.8. Github-Pull: #bitcoin-core/gui#177 Rebased-From: 4e1154d (cherry picked from commit 6dc58e9)
The "macintosh" style is broken on macOS Big Sur at least for Qt 5.9.8. Github-Pull: #bitcoin-core/gui#177 Rebased-From: 4e1154d (cherry picked from commit 6dc58e9)
The "macintosh" style is broken on macOS Big Sur at least for Qt 5.9.8. Github-Pull: #bitcoin-core/gui#177 Rebased-From: 4e1154d (cherry picked from commit 6dc58e9)
The "macintosh" style is broken on macOS Big Sur: