Fix Label having non-integer sizes
When using a non-integer baseLine, the height can be non-integer, resulting in non-exact pixel alignments which generate artifacts on the screen. This happened in Kickoff's LeaveView in Plasma 5.18 (currently used in openSUSE Leap 15.3) where the focus outline was painted with a different width in the top and bottom borders due to this pixel misalignment.
This commit is contained in:
parent
e9ef688387
commit
a4e4156a47
@ -12,6 +12,9 @@ import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
T.Label {
|
||||
id: control
|
||||
|
||||
height: Math.ceil(implicitHeight)
|
||||
width: Math.ceil(implicitWidth)
|
||||
|
||||
verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
|
||||
|
||||
activeFocusOnTab: false
|
||||
|
Loading…
Reference in New Issue
Block a user