Run spectable with QT_DEVICE_PIXEL_RATIO=2 and the region selection screen will be scaled 2x Reproducible: Always Steps to Reproduce: 1. Run QT_DEVICE_PIXEL_RATIO=2 spectacle 2. Take a "Rectangular Region" screenshot 3. Actual Results: The region selector is scaled up and only a quarter of the screen is visible Expected Results: The entire screen is visible
Does it work properly on an actual HiDPI screen? I don't want to fix QT_DPR support on non-HiDPI screens - I just want it to work on real HiDPI hardware.
I have a high dpi screen which is why I use this option.
Git commit 3484b8fb09872a0c9a4754c473e11b46544e847e by Kai Uwe Broulik. Committed on 23/12/2015 at 09:52. Pushed by broulik into branch 'Applications/15.12'. Properly support QT_DEVICE_PIXEL_RATIO This fixes the region grabber when running spectacle with QT_DEVICE_PIXEL_RATIO>1. It fixes rendering the grabbed image, selecting it, the help overlays as well as the preview of the high dpi pixmap. REVIEW: 126479 FIXED-IN: 15.12.1 M +1 -1 src/Gui/KSImageWidget.cpp M +23 -11 src/Gui/ScreenClipper.cpp http://commits.kde.org/kscreengenie/3484b8fb09872a0c9a4754c473e11b46544e847e
*** Bug 356765 has been marked as a duplicate of this bug. ***
Now I'm on 16.03.90 (with Qt 5.6.0 KF 5.21), I notice that "Rectangle region" had the this problem again. It only shows the left top 1/4 part of the screen.
I have no problem with 15.12.3 if I downgrade only spectacle.
But we specifically tested with QT_DEVICE_PIXEL_RATIO=2 and confirmed the new implementation was working. We even made minor corrections to the code to fix edge cases. Kai, if you have some free time could you verify this bug?
Just encountered it yesterday, I can confirm that with the new QML-UI it's broken, I reverted back 15.12 branch and there it works.
Right, I'll try and fix this tomorrow
I can confirm that I've reproduced this bug on my computer. I strongly suspect this is a Qt 5.6 problem.
Fixed in 16.04 git now, should be out with 16.04.1
I'm afraid this is not completely fixed yet. If I use region selection, the actual selected image is not the correct one. It's clipped to 1/4 of the top-left of selected region on my screen setup. Can you check it again? I think the clip region also need to be scaled.
Comment 12 is based on Applications/16.04 branch.
Git commit 38804556588e977aaaea5f50115363d9f4dc379d by Weng Xuetian. Committed on 08/05/2016 at 16:11. Pushed by xuetianweng into branch 'Applications/16.04'. Fix high dpi region selection. Coordinates need to be scaled to native pixel before clip. REVIEW: 127814 M +8 -2 src/QuickEditor/EditorRoot.qml http://commits.kde.org/kscreengenie/38804556588e977aaaea5f50115363d9f4dc379d
*** Bug 362653 has been marked as a duplicate of this bug. ***
I found one remaining edge case where the fullscreen picture is displayed at the wrong location. Consider a laptop screen on the left (primary) with an external, larger screen on the right with resolutions 1920x1080 and 2560x1440 respectively and QT_SCALE_FACTOR=2. The bottom sides are aligned such that you can move a pointer between the bottoms without a jumping cursor. This means that the origin of the laptop screen is no longer at (0, 0), but (0,360). When the image is scaled by 2, the translated origin of the laptop screen becomes (0,180). But Qt expects screen coordinates in native pixels and is still painting from the (0,360), resulting in an upward shift of the image and loss of the bottom half! Adding a margin should work, but maybe you can think of other edge cases? (Two different resolutions below each other? Others?) (I have also reported the lack of documentation on the origin at https://bugreports.qt.io/browse/QTBUG-56555)
Git commit 1244980882382639f35925cef1d4cf3eeb3c240c by Peter Wu. Committed on 20/10/2016 at 20:40. Pushed by peterwu into branch 'master'. Fix initial region location for High DPI screens QML dimensions are measured in device-independent pixels, be sure to make appropriate conversions. Also make sure that the new selection size feature displays the correct dimensions. Tested with: QT_SCALE_FACTOR=2 src/spectacle and dragging the region. REVIEW: 129190 M +1 -1 src/QuickEditor/EditorRoot.qml M +5 -4 src/QuickEditor/QuickEditor.cpp http://commits.kde.org/spectacle/1244980882382639f35925cef1d4cf3eeb3c240c
rectangle area also shows dimensions with fraction errors like 24.0000000001 X 35.000000000001
Created attachment 110192 [details] spectacle-rectangle-hidpi.png The new QML UI still has issues in HiDPI mode, even though the pixmap itself seems fine now (see screenshot). In src/QuickEditor/EditorRoot.qml, this mostly concerns "ctx" / Context2D. I wonder whether this is related to https://bugreports.qt.io/browse/QTBUG-37095, although with Qt 5.10.0 it's still problematic for me.
I believe this issue has been fixed for some time. Tested on Wayland and X (including the issue reported by xchain about the text in box not being scaled).
Indeed.