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

macOS 11 (Big Sur) visual bugs #136

Closed
2 tasks
jonasschnelli opened this issue Nov 25, 2020 · 8 comments · Fixed by bitcoin/bitcoin#22054
Closed
2 tasks

macOS 11 (Big Sur) visual bugs #136

jonasschnelli opened this issue Nov 25, 2020 · 8 comments · Fixed by bitcoin/bitcoin#22054
Labels
Bug Something isn't working macOS

Comments

@jonasschnelli
Copy link
Contributor

Nighy build on Big Sur "dark mode":
Screenshot 2020-11-24 at 20 13 04

Self compiled on Big Sur "night mode" with depends:
Screenshot 2020-11-24 at 20 10 38

Two major issues:

  • disabling the night mode color palette or adopt it correctly (probably a QT upstream issue)
  • get rid of the white glitch in the debug-window tab-bar-menu

Qt upstream issue: https://bugreports.qt.io/browse/QTBUG-85546

@mjdietzx
Copy link
Contributor

I also noticed what seems to be a bug on Big Sur. When I go to send a transaction from my encrypted wallet, I get a popup that says "Unlock wallet". I enter the correct passphrase, but no matter what the "OK" button stays disabled and can't be clicked. Usually I'd expect once you enter at least 1 char into the passphrase input, that button would become enabled/clickable

maflcko pushed a commit that referenced this issue Nov 28, 2020
8008ef7 qt: unlock wallet "OK" button bugfix (Michael Dietz)

Pull request description:

  When trying to send a transaction from an encrypted wallet, the ask
  passphrase dialog would not allow the user to click the "OK" button
  and proceed. Therefore it was impossible to send a transaction
  through the gui. It was not enabling the "OK" button after the
  passphrase was entered by the user, because it was using the same
  form validation logic as the "Change passphrase" flow.

  I reported this in a comment in #136. But then I realized this seems to be a flat out bug.

ACKs for top commit:
  MarcoFalke:
    review ACK 8008ef7
  hebasto:
    ACK 8008ef7, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: cc09b34c7f3aea09729e1c7ccccff05dc11fec56fee2ad369f2d862979572b1edd8b7e738ffe6e91d35d071b819b0c3e0f5d48bf5e27427a80af4a28893f8aaf
sidhujag pushed a commit to syscoin/syscoin that referenced this issue Nov 28, 2020
8008ef7 qt: unlock wallet "OK" button bugfix (Michael Dietz)

Pull request description:

  When trying to send a transaction from an encrypted wallet, the ask
  passphrase dialog would not allow the user to click the "OK" button
  and proceed. Therefore it was impossible to send a transaction
  through the gui. It was not enabling the "OK" button after the
  passphrase was entered by the user, because it was using the same
  form validation logic as the "Change passphrase" flow.

  I reported this in a comment in bitcoin-core/gui#136. But then I realized this seems to be a flat out bug.

ACKs for top commit:
  MarcoFalke:
    review ACK 8008ef7
  hebasto:
    ACK 8008ef7, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: cc09b34c7f3aea09729e1c7ccccff05dc11fec56fee2ad369f2d862979572b1edd8b7e738ffe6e91d35d071b819b0c3e0f5d48bf5e27427a80af4a28893f8aaf
@goums
Copy link

goums commented Dec 18, 2020

I've tried to update the QPalette and the styleSheet of the widgets to fix the display glitches, but I didn't manage to fix them as the bugs are directly in the QMacStyle widgets implementations.

The QT team is working on it, but the underlying QT issues will probably take some time to be resolved and is tagged for QT6:
https://bugreports.qt.io/browse/QTBUG-86513

So one solution instead of waiting for QT6 release (and hoping for QMacStyle to be fixed) could be to force QApplication to use the default "Fusion" style on macos:
https://doc.qt.io/qt-5/gallery.html

This is a one line change, no added dependencies, and it supports Light / Dark modes out of the box.

  • Some screenshots using Fusion on DarkMode :
    image
    image
    image
    image
    image

  • Some screen shot using Fusion on Light Mode :
    image
    image
    image
    image

@jonasschnelli
Copy link
Contributor Author

@goums: can the fusion style be a runtime option? Or even a startup ENV parameter?

@goums
Copy link

goums commented Dec 18, 2020

Yes, according to the doc, it can be either set with a command line argument or an environment variable.
https://doc.qt.io/qt-5/qapplication.html#QApplication

I got an error Invalid parameter -style if I try to add it to the command line, but it works nice if I use the environment variable: QT_STYLE_OVERRIDE =fusion.

It can be set on the Project > Build & Run > Run > Environment :
image

NB: you need to fetch #154 to have the icon colorized on macos dark mode

@hebasto
Copy link
Member

hebasto commented Jan 7, 2021

@jonasschnelli

@goums: can the fusion style be a runtime option? Or even a startup ENV parameter?

I think the former is disabled since bitcoin/bitcoin#16578.

@hebasto
Copy link
Member

hebasto commented Jan 7, 2021

A workaround is suggested in #177.

jonasschnelli added a commit that referenced this issue Jan 28, 2021
4e1154d qt: Use "fusion" style on macOS Big Sur with old Qt (Hennadii Stepanov)

Pull request description:

  The "macintosh" style is broken on macOS Big Sur:

  - bitcoin/bitcoin#20555 (comment)
  - #136

ACKs for top commit:
  MarcoFalke:
    review ACK 4e1154d can't test
  jarolrod:
    ACK 4e1154d
  jonasschnelli:
    Tested ACK 4e1154d

Tree-SHA512: c2e0f7be220c8b34b182c73e362f41d0e8c8c002e766fcb5491c62f3cfb9f70eabbd32b29baefa152135efc5f83b15534c1c2459e500a586b0f64c5aa8acf614
@hebasto
Copy link
Member

hebasto commented Mar 22, 2021

@jonasschnelli

It seems the most of visual bugs are gone after Qt bumping to 5.12.10 (bitcoin/bitcoin#21376).

A few things left like https://bugreports.qt.io/browse/QTBUG-86513.

Efforts to support the dark mode are tracked in #154.

Maybe, there are no reasons to keep this issue opened?

maflcko pushed a commit that referenced this issue Mar 29, 2021
dc4551c remove incompatibility release note for darkmode on macos (Sylvain Goumy)
303cfc6 allow darkmode on macos build (Sylvain Goumy)
78f75a2 Allow icon colorization on mac os to better support dark mode (Uplab)

Pull request description:

  Allow icons to be colorized on macOS to support native Dark mode color scheme.

  Rendering on macOS Big Sur before PR:
  ![macos-darkmode-before-pr](https://user-images.githubusercontent.com/5577626/102502739-43f3af80-407f-11eb-9263-5bbc27b371c2.png)

  Rendering on macOS Big Sur after PR:
  ![macos-darkmode-after-pr](https://user-images.githubusercontent.com/5577626/102502678-350cfd00-407f-11eb-8b98-e271f2688c36.png)

  Light mode stay visually unchanged.

  <del>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). </del>
  <del>But once all glitches are fixed, we will be able to remove this temporary fix. </del>
  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

ACKs for top commit:
  hebasto:
    re-ACK dc4551c
  jarolrod:
    ACK dc4551c

Tree-SHA512: 1c3a4dec796063e61fcaf80112afc2b15c8669a1cd30ebd537cea96647c20215f8f80289719f905820bb0c490c8c1f94bfae4bb32f9c6d1fdd4e8f199ebb559f
@hebasto
Copy link
Member

hebasto commented May 25, 2021

It looks that after bitcoin/bitcoin#22054 is merged this issue could be closed.

sidhujag pushed a commit to syscoin/syscoin that referenced this issue Jun 3, 2021
fa416ce depends: Bump Qt version to 5.12.11 (Hennadii Stepanov)

Pull request description:

  Qt 5.12.11:
  - [fixes](qt/qtbase@c5d9046) macOS related [QTBUG-87014](https://bugreports.qt.io/browse/QTBUG-87014), and the `fix_bigsur_drawing.patch` (which is our workaround for QTBUG-87014) could be dropped
  - [upgrades](qt/qtbase@00326c9) supported macOS SDK to 11.0, and removes related warnings
  - fixes tab widget rendering on macOS Big Sur ([here](qt/qtbase@4d6832d) and [here](qt/qtbase@28b0153)):
    - master (5.12.10)
  ![DeepinScreenshot_select-area_20210525122725](https://user-images.githubusercontent.com/32963518/119474470-dd24a180-bd54-11eb-82e6-ca4d39b0b177.png)
  ![DeepinScreenshot_select-area_20210525123634](https://user-images.githubusercontent.com/32963518/119475548-ebbf8880-bd55-11eb-9c13-477016f8c23b.png)
    - this PR (5.12.11)
  ![Screenshot from 2021-05-25 12-28-02](https://user-images.githubusercontent.com/32963518/119474537-ed3c8100-bd54-11eb-8efe-7fe5ccae8a98.png)

  Closes bitcoin-core/gui#136.

ACKs for top commit:
  goums:
    ACK fa416ce
  fanquake:
    ACK fa416ce - merging this now to move it out of the way of other Qt related changes.

Tree-SHA512: 4e621b214f05d12a060757fadf2fa103c09b594d7b1c2ad9200f550e55c1e1fdf66f2f830550e724b9277448e5480be256cb0003f4597902944400e16c4a68b8
@bitcoin-core bitcoin-core locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants