Skip to content

Commit 8b00e7f

Browse files
committed
fix: keep dock indicator distance constant when icons scale down
1 parent 53cd1ac commit 8b00e7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

panels/dock/taskmanager/package/AppItem.qml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,25 +161,25 @@ Item {
161161
case Dock.Top: {
162162
windowIndicator.anchors.horizontalCenter = iconContainer.horizontalCenter
163163
windowIndicator.anchors.top = parent.top
164-
windowIndicator.anchors.topMargin = Qt.binding(() => {return (root.height - iconSize) / 2 / 3})
164+
windowIndicator.anchors.topMargin = Qt.binding(() => {return Math.max((root.height - iconSize) / 2 - 8, (root.height - iconSize) / 2 / 3)})
165165
return
166166
}
167167
case Dock.Bottom: {
168168
windowIndicator.anchors.horizontalCenter = iconContainer.horizontalCenter
169169
windowIndicator.anchors.bottom = parent.bottom
170-
windowIndicator.anchors.bottomMargin = Qt.binding(() => {return (root.height - iconSize) / 2 / 3})
170+
windowIndicator.anchors.bottomMargin = Qt.binding(() => {return Math.max((root.height - iconSize) / 2 - 8, (root.height - iconSize) / 2 / 3)})
171171
return
172172
}
173173
case Dock.Left: {
174174
windowIndicator.anchors.verticalCenter = parent.verticalCenter
175175
windowIndicator.anchors.left = parent.left
176-
windowIndicator.anchors.leftMargin = Qt.binding(() => {return (root.width - iconSize) / 2 / 3})
176+
windowIndicator.anchors.leftMargin = Qt.binding(() => {return Math.max((root.width - iconSize) / 2 - 8, (root.width - iconSize) / 2 / 3)})
177177
return
178178
}
179179
case Dock.Right:{
180180
windowIndicator.anchors.verticalCenter = parent.verticalCenter
181181
windowIndicator.anchors.right = parent.right
182-
windowIndicator.anchors.rightMargin = Qt.binding(() => {return (root.width - iconSize) / 2 / 3})
182+
windowIndicator.anchors.rightMargin = Qt.binding(() => {return Math.max((root.width - iconSize) / 2 - 8, (root.width - iconSize) / 2 / 3)})
183183
return
184184
}
185185
}

0 commit comments

Comments
 (0)