Fix rubberband selection outline position

Authored by ndavis on Dec 14 2019, 6:56 PM.

Description

Fix rubberband selection outline position

Summary:
Before this patch, the outline of the rubberband selection control was down and to the right half a pixel too far.
This wasn't visible at 1x scaling because of the lack of antialiasing, but resulted in the top/left being too thin and bottom/right being too thick on high DPI displays.
To fix the issue, I enabled antialiasing and moved all sides inwards by half a pixel so that the outline would be pixel perfect.
I also added a function to get a QRectF with the correct size and position for rectangles with pen strokes.

Test Plan:

  • Open dolphin and make a selection with the mouse
  • Go to a Folder View Plasma widget and make a selection with the mouse

2x scaling
before:


after:

3x scaling
before:


after:

Reviewers: VDG, Breeze, Plasma, hpereiradacosta, broulik

Reviewed By: hpereiradacosta

Subscribers: broulik, plasma-devel

Tags: Plasma, Breeze, VDG

Differential Revision: https://phabricator.kde.org/D26001

Details

Committed
ndavisDec 14 2019, 7:39 PM
Reviewer
hpereiradacosta
Differential Revision
D26001: Fix rubberband selection outline position
Parents
R31:a268d59355c2: Merge branch 'Plasma/5.17'
Branches
Unknown
Tags
Unknown