Skip to content

Conversation

@codablock
Copy link

Backporting bitcoin#16254 fixes Qt's HiRes support, which was meant to be enabled since a long time already. But due to Qt::AA_EnableHighDpiScaling being enabled after the instantiation of BitcoinApplication, this never actually worked.

Fixing this also allows us to remove the hires theme, as the normal themes already work perfectly fine on a HiDpi monitor now.

MarcoFalke and others added 2 commits November 22, 2019 12:22
099e4b9 Set AA_EnableHighDpiScaling attribute early (Hennadii Stepanov)

Pull request description:

  Running `bitcoin-qt` compiled against Qt 5.12.4 causes a warning:
  ```
  hebasto@bionic-qt:~/bitcoin$ src/qt/bitcoin-qt
  Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
  ```

  This PR fixes this issue.

  From Qt docs:
  - [Qt::AA_EnableHighDpiScaling](https://doc.qt.io/qt-5/qt.html#ApplicationAttribute-enum):
  > Enables high-DPI scaling in Qt on supported platforms (see also High DPI Displays). _Supported platforms are X11, Windows and Android._ Enabling makes Qt scale the main (device independent) coordinate system according to display scale factors provided by the operating system. This corresponds to setting the `QT_AUTO_SCREEN​_SCALE_FACTOR` environment variable to 1. This attribute must be set before `QGuiApplication` is constructed. This value was added in Qt 5.6.

  - [QCoreApplication::setAttribute()](https://doc.qt.io/qt-5/qcoreapplication.html#setAttribute)

ACKs for commit 099e4b:
  MarcoFalke:
    ACK 099e4b9
  jonasschnelli:
    utACK 099e4b9
  fanquake:
    ACK 099e4b9. Did some testing on `Bionic` and `Windows 10` (using VirtualBox). I couldn't see any obvious visual difference, but given Marco's screens above, this change is obviously better. I also checked that there wasn't any sort of regression on macOS.

Tree-SHA512: 1965a427ee14ffb3871bac317685032406cf02d1fa2b2dc11c8b643bfe4ba09195674d149d1e41752f14c0d000446b35e142f3ce60d987ba97082fd7ee39a094
@codablock codablock added this to the 15 milestone Nov 22, 2019
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Can confirm that non-hires light theme looks fine on my machine.

partially-tested-ACK

@codablock
Copy link
Author

@jhodges10 can you maybe test this PR and confirm that it looks fine on HiRes?

Copy link

@nmarley nmarley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks the same for me on normal resolution

slightly tested ACK

UdjinM6 added a commit to UdjinM6/dash that referenced this pull request Nov 22, 2019
UdjinM6 added a commit that referenced this pull request Nov 22, 2019
* Copy light(-hires).css -> dark(-hires).css (with no changes yet)

* Add dark(-hires).css to makefile/qrc and show them in theme selector

* Dark theme (css part)

* Do not style unit selector in status bar via platform styles, use css instead

* No coloring via forms (*.ui)

* Implement and use helpers to style parts of rich text differently for light and dark themes

* Remove dark-hires due to #3217

* Revert changes to light-hires.css to avoid merge conflicts with #3217
@UdjinM6 UdjinM6 merged commit ef55e48 into dashpay:develop Nov 22, 2019
FornaxA pushed a commit to ioncoincore/ion that referenced this pull request Jul 6, 2020
* Copy light(-hires).css -> dark(-hires).css (with no changes yet)

* Add dark(-hires).css to makefile/qrc and show them in theme selector

* Dark theme (css part)

* Do not style unit selector in status bar via platform styles, use css instead

* No coloring via forms (*.ui)

* Implement and use helpers to style parts of rich text differently for light and dark themes

* Remove dark-hires due to dashpay#3217

* Revert changes to light-hires.css to avoid merge conflicts with dashpay#3217

Signed-off-by: cevap <[email protected]>
cryptolinux pushed a commit to cryptolinux/ion that referenced this pull request Feb 6, 2021
* Copy light(-hires).css -> dark(-hires).css (with no changes yet)

* Add dark(-hires).css to makefile/qrc and show them in theme selector

* Dark theme (css part)

* Do not style unit selector in status bar via platform styles, use css instead

* No coloring via forms (*.ui)

* Implement and use helpers to style parts of rich text differently for light and dark themes

* Remove dark-hires due to dashpay#3217

* Revert changes to light-hires.css to avoid merge conflicts with dashpay#3217

Signed-off-by: cevap <[email protected]>
ckti pushed a commit to ckti-gitian-ion/ion that referenced this pull request Mar 29, 2021
* Copy light(-hires).css -> dark(-hires).css (with no changes yet)

* Add dark(-hires).css to makefile/qrc and show them in theme selector

* Dark theme (css part)

* Do not style unit selector in status bar via platform styles, use css instead

* No coloring via forms (*.ui)

* Implement and use helpers to style parts of rich text differently for light and dark themes

* Remove dark-hires due to dashpay#3217

* Revert changes to light-hires.css to avoid merge conflicts with dashpay#3217

Signed-off-by: cevap <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants