Skip to content

Commit

Permalink
fix: compensate weird margin of tray expand button
Browse files Browse the repository at this point in the history
closes: #33
refs: #69
  • Loading branch information
luisbocanegra committed Sep 18, 2024
1 parent 8a0a4c3 commit 620024f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions package/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,35 @@ PlasmoidItem {
when: addMargin && (itemType === Enums.ItemType.TrayArrow || itemType === Enums.ItemType.TrayItem)
}

// fix tray weird margin
Binding {
target: rect.target
property: "Layout.leftMargin"
value: -2
when: addMargin && itemType === Enums.ItemType.TrayArrow && horizontal
}

Binding {
target: rect.target
property: "Layout.rightMargin"
value: 2
when: addMargin && itemType === Enums.ItemType.TrayArrow && horizontal
}

Binding {
target: rect.target
property: "Layout.topMargin"
value: -2
when: addMargin && itemType === Enums.ItemType.TrayArrow && !horizontal
}

Binding {
target: rect.target
property: "Layout.bottomMargin"
value: 2
when: addMargin && itemType === Enums.ItemType.TrayArrow && !horizontal
}

Rectangle {
id: borderRec
anchors.fill: parent
Expand Down Expand Up @@ -674,6 +703,8 @@ PlasmoidItem {
if (!(item instanceof GridView)) {
if (Utils.isBgManaged(item)) continue
item.iconSize = horizontal ? trayGridView.cellWidth : trayGridView.cellHeight
// item.Layout.leftMargin = -2
// item.Layout.rightMargin = 2
backgroundComponent.createObject(item,
{ "z":-1, "target": item, "itemType": Enums.ItemType.TrayArrow, "targetIndex": index}
)
Expand Down

0 comments on commit 620024f

Please sign in to comment.