Serval HiDPI issues on Linux and Windows #6472

issue jonasschnelli opened this issue on July 24, 2015
  1. jonasschnelli commented at 10:19 AM on July 24, 2015: contributor

    Somehow I expected that Qt upstream does handle the HiDPI differences. It looks like that handling HiDPI correctly would require some streamlining in our code.

    Splashscreen

    HiDPI Window8 NOK <img width="1182" alt="bildschirmfoto 2015-07-24 um 11 38 39" src="https://cloud.githubusercontent.com/assets/178464/8872301/00dfe0ca-31fc-11e5-94b0-13dbb4f8e0cd.png">

    Linux NOK: bildschirmfoto-2015-07-24-um-12 16 11

    OSX OK: <img width="564" alt="bildschirmfoto 2015-07-24 um 12 04 31" src="https://cloud.githubusercontent.com/assets/178464/8872321/30b56432-31fc-11e5-8f4d-b357e98a36ec.png">

    Icon big/small mix: Linux NOK: <img width="526" alt="bildschirmfoto 2015-07-24 um 12 14 09" src="https://cloud.githubusercontent.com/assets/178464/8872469/8d2c6340-31fd-11e5-9f6e-1b5ca005c8f8.png">

    OSX OK: <img width="1035" alt="bildschirmfoto 2015-07-24 um 12 15 29" src="https://cloud.githubusercontent.com/assets/178464/8872486/b4e38760-31fd-11e5-8031-86021a45da0a.png">

    Linux Menu Icons wrong size: bildschirmfoto-2015-07-24-um-12 17 12

  2. jonasschnelli commented at 9:30 PM on July 24, 2015: contributor

    Maybe we should disable HiDPI for Win/Linux until it's streamlines upstream? https://github.com/bitcoin/bitcoin/blob/master/src/qt/bitcoin.cpp#L514

  3. theuni commented at 11:40 PM on July 24, 2015: member

    If this is to be believed, then disabling for !osx makes sense at least until we can test with 5.6.

  4. theuni commented at 11:57 PM on July 24, 2015: member

    @jonasschnelli I couldn't help myself, so I tried out building the qt 5.6 wip branch with dpi changes: https://github.com/qtproject/qtbase/tree/wip/highdpi

    I'm not sure if there are changes necessary in downstream code, or if things are expected to "just work".

    I can't actually test it, but here are some binaries if you're interested. Linux: https://bitcoincore.org/cfields/bitcoin-qt-linux-qt56-hidpi Win: https://bitcoincore.org/cfields/bitcoin-qt-win-qt56-hidpi.exe

    It's my current qt "5.5 bump" branch with this hack on top:

    diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
    index 0fd3f32..440b65a 100644
    --- a/depends/packages/qt.mk
    +++ b/depends/packages/qt.mk
    @@ -1,9 +1,10 @@
     PACKAGE=qt
     $(package)_version=5.5.0
    -$(package)_download_path=http://download.qt.io/official_releases/qt/5.5/$($(package)_version)/submodules
    +$(package)_download_path=https://github.com/qtproject/qtbase/archive
    +$(package)_extra_download_path=http://download.qt.io/official_releases/qt/5.5/$($(package)_version)/submodules
     $(package)_suffix=opensource-src-$($(package)_version).tar.gz
    -$(package)_file_name=qtbase-$($(package)_suffix)
    -$(package)_sha256_hash=7e82b1318f88e56a2a9376e069aa608d4fd96b48cb0e1b880ae658b0a1af0561
    +$(package)_file_name=5bfb6ce4bf5b090dc88463a2e7a4aae3ef10fe09.tar.gz
    +$(package)_sha256_hash=6ca060d1c133f142ce29383e1dec7118198d97c86db7f73e0890d9ac80a5c482
     $(package)_dependencies=openssl
     $(package)_linux_dependencies=freetype fontconfig dbus libxcb libX11 xproto libXext
     $(package)_build_subdir=qtbase
    @@ -102,8 +103,8 @@ endef
    
     define $(package)_fetch_cmds
     $(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
    -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) &
    -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash))
    +$(call fetch_file,$(package),$($(package)_extra_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_ha
    +$(call fetch_file,$(package),$($(package)_extra_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash))
     endef
    
     define $(package)_extract_cmds
    @@ -121,6 +122,7 @@ define $(package)_extract_cmds
     endef
    
     define $(package)_preprocess_cmds
    +  mkdir -p qtbase/.git && \
       sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
       sed -i.old "s/src_plugins.depends = src_sql src_xml src_network/src_plugins.depends = src_xml src_network/" qtbase/src/src.pro && \
       sed -i.old "s/PIDLIST_ABSOLUTE/ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowscontext.h &&\
    
  5. jonasschnelli commented at 12:09 AM on July 25, 2015: contributor

    Hmm.. tested shortly both versions (linux/win). No difference visible.

    <img width="474" alt="bildschirmfoto 2015-07-25 um 02 02 21" src="https://cloud.githubusercontent.com/assets/178464/8886884/f690b31c-3271-11e5-8b3d-54ae347283df.png"> <img width="1182" alt="bildschirmfoto 2015-07-25 um 02 06 51" src="https://cloud.githubusercontent.com/assets/178464/8886885/f6d0667e-3271-11e5-978d-7706745cf5f3.png"> <img width="918" alt="bildschirmfoto 2015-07-25 um 02 01 58" src="https://cloud.githubusercontent.com/assets/178464/8886888/0624f77a-3272-11e5-9b90-5c002f582742.png">

  6. jonasschnelli commented at 10:01 AM on July 27, 2015: contributor

    I found out by running bitcoin-qt with the environment variable QT_DEVICE_PIXEL_RATIO=2 looks much better on HiDPI linux, thought, not perfect and not the same as on OSX.

  7. sipa commented at 10:14 AM on July 27, 2015: member

    I don't understand why this is causing problems. In what way is HiDPI not just a higher DPI setting?

    I don't know much about UIs, and I hate high resolution interfaces because my vision is rather bad, but I don't see why this is causing so much problems.

  8. jonasschnelli commented at 10:21 AM on July 27, 2015: contributor

    @sipa: If you have a 2880x1800 screen, you barely can't see anything if you don't scale the UI. Therefore apple announced the *2 approach. Just double everything, image/icon size, window bars, font, etc. This gives a extremely comfortable result.

    Now the problem is, that on Linux, Qt auto-scale the Font and metrics, but leaving out the Icons in Buttons as well as window sizes. IMO it's just not finished or fixed in all places (QT upstream).

  9. sipa commented at 10:24 AM on July 27, 2015: member

    I would have expected that higher DPI would scale all UI elements too proportionally. That seems like a much more flexible solution...

    Anyway, sorry for the distraction, it has nothing to do with this issue.

  10. jonasschnelli commented at 10:27 AM on July 27, 2015: contributor

    Proportional, non-fixed-step scaling makes sense.. modern linux desktops allows that. It would work if Qt would scale the icons/window sizes according to the given scale factor.

  11. laanwj commented at 10:59 AM on July 27, 2015: member

    I don't understand why this is causing problems. In what way is HiDPI not just a higher DPI setting?

    It's a typical theory versus practice thing. If UI systems had been designed from the start to be scalable instead of adapted to a selection of resolutions it'd all have been a lot easier. Now it causes issues on the whole spectrum from the OS itself to GUI libraries to applications themselves, as well as malfunctions due to communication issues between those levels.

  12. laanwj added the label GUI on Jul 28, 2015
  13. laanwj added the label Upstream on Feb 16, 2016
  14. jonasschnelli commented at 4:39 PM on February 19, 2016: contributor

    Upstream issue, should be better with Qt5.6 (once it's released, planed for Q1/2016): http://blog.qt.io/blog/2015/12/18/qt-5-6-beta-released/

  15. fanquake commented at 11:05 AM on June 22, 2016: member

    @jonasschnelli What's the status here now that we've switched to Qt 5.6.1 ?

  16. MarcoFalke commented at 11:20 AM on June 22, 2016: member

    Duplicate of #7341?

  17. laanwj commented at 11:46 AM on June 22, 2016: member

    Yes, I think it's solved with the switch to Qt 5.6.1. @cosmicvibe reported that in #7341 after installing Qt 5.6.1 the text was readable.

  18. laanwj commented at 11:47 AM on June 22, 2016: member

    Closing due to Qt 5.6.1 switch which addresses this (#8210).

  19. laanwj closed this on Jun 22, 2016

  20. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 00:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me