Skip to content

Commit c8fe3bd

Browse files
committed
fix: Ensure the show desktop line is always 1 physical pixel regardless of system scaling
as title Log: as title Pms: BUG-302035
1 parent fee593a commit c8fe3bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

panels/dock/showdesktop/package/showdesktop.qml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ AppletItem {
3232

3333
Rectangle {
3434
property D.Palette lineColor: DockPalette.showDesktopLineColor
35-
implicitWidth: useColumnLayout ? showdesktop.implicitWidth : 1
36-
implicitHeight: useColumnLayout ? 1 : showdesktop.implicitHeight
35+
// Use device pixel ratio to ensure the line is always 1 physical pixel regardless of system scaling
36+
property real devicePixelRatio: Screen.devicePixelRatio
37+
implicitWidth: useColumnLayout ? showdesktop.implicitWidth : (1 / devicePixelRatio)
38+
implicitHeight: useColumnLayout ? (1 / devicePixelRatio) : showdesktop.implicitHeight
3739

3840
color: D.ColorSelector.lineColor
3941
}

0 commit comments

Comments
 (0)