Page MenuHomePhabricator

Improve high DPI support
Closed, WontfixPublic

Description

When running the application on a high DPI display using the Qt system-variable QT_DEVICE_PIXEL_RATIO there are two issues right now:

  1. Qt based overlays are not correctly rendered

When changing the text of an overlay the 'old' value is still visible because the new value is somehow just painted above the old one without correctly clearing it.

Origin of the issue:
There is a bug in Qt that causes the repainting to be messed up when the QT_DEVICE_PIXEL_RATIO!=1 and a widget has the attribute 'translucent-background' as the widget containing the overlays has.

Solution:
Use a custom widget as container that overrides the paintEvent of the widget and fix the painting issue. (Solution from Qt-Forum)

  1. vtk based overlays are not correctly positioned when rendering PlanarFigures

The variable QT_DEVICE_PIXEL_RATIO changes the scaling of the Qt rendering. This change in scale is not considered in the positioning of the vtk based overlays.
Thus the overlays are not rendered where they're supposed to be.

Origin of the issue:
QVTKWidget does not consider the QT_DEVICE_PIXEL_RATIO -> Positioning is incorrect.

Solution:
Manually fix the position of the overlays in the mitkPlanarFigureMapper2D

Event Timeline

User engelm has pushed new remote branch:

bug-19389-improve-high-dpi

[5aa8cc]: Merge branch 'bug-19389-improve-high-dpi'

Merged commits:

2015-10-22 13:38:37 Markus Engel [2bb038]
Merge branch 'master' into bug-19389-improve-high-dpi


2015-10-22 13:34:11 Markus Engel [c2fea8]
correctly considering QT_DEVICE_PIXEL_RATIO in positioning of annotations


2015-10-22 13:32:54 Markus Engel [f5c24c]
Using QmitkOverlayContainerWidget as container for qt based overlays

kislinsk removed engelm as the assignee of this task.
kislinsk added a project: Auto-closed.
kislinsk added subscribers: engelm, 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