Page MenuHomePhabricator

Improve MITK HiDPI support
Closed, ResolvedPublic

Description

UI rendering on HiDPI diplays (4k, 2,5k on small laptops etc.) is still sub-optimal. Qt has changed and probably improved a lot since we last checked with their options:

http://doc.qt.io/qt-5/highdpi.html

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision

Related Objects

Mentioned In
MITK v2023.04

Event Timeline

nolden triaged this task as Wishlist priority.Dec 18 2017, 4:07 PM
nolden created this task.
kislinsk claimed this task.
kislinsk added a project: Auto-closed.
kislinsk added a subscriber: kislinsk.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kislinsk removed kislinsk as the assignee of this task.May 26 2020, 12:05 PM
kislinsk removed a subscriber: kislinsk.
floca raised the priority of this task from Wishlist to Needs Triage.Jan 24 2023, 11:17 AM
floca edited projects, added Request for Discussion, MITK (v2023.04); removed Auto-closed, MITK.
floca added a subscriber: floca.

We should discuss if/how we revisit that task. With current hidpi monitors (e.g. our new notebooks), it realy starts to become a usibility issue in my regard.

here is an example from my notebook with a few issues:

  1. Welcome screen is very small and somehow off
  2. initial scaling off left sidebar is too small for the navigator view
  3. height of node selection widgets is to small and as a result the thumbnail is so small that it is rendered nearly useless
  4. icons in the list of labels are not scaled correctly (guess due to hard coded sizes).
  5. Icons of the tools are too small

    mitk hidpi.PNG (2×3 px, 428 KB)

remark: notably the icons of our toolbar upscaled correctly. So there our blueberry code seems to make something right/better.

remark 2: regarding a better/correct sizing in relation to the screen dpi this code snippet could be helpfull (https://stackoverflow.com/questions/60259134/how-to-set-fixed-icon-size-that-scales-with-hidpi-in-qt). Shows how to implement helper class that scales us given the QSize instance so that it is appropriate to the current screen dpi.

floca triaged this task as Normal priority.Mar 22 2023, 9:04 AM
floca moved this task from Backlog to MITK Meeting on the Request for Discussion board.

Checked to add

QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

in QCoreApplication *mitk::BaseApplication::getQApplication() const.

Adding that results in good rendering on high and low DPI.
BUT all the interaction (clicking at a position, interactions with the seg tools) with renderwindows are now off. I guess because they do not take the dpi scaling into account and just assume that scaling is 1, thus wrong absolute or relative positions.

So either we fix render window interactions or we fix hardcoded sizing of widgets.
Currently I tend to try fixing the render window interactions first, because then we could just use the system auto scaling.

We could make this a cmake option so others using MITK as a framework could deaktivate it if the do not want it.
@kislinsk What do you think?

Not sure if we need a CMake option for it, as long as it works in all scenarios. :)