plugins/overview: Adds a border around hovered and selected desktop in desktopGrid
Currently desktop grid view is missing the selection rectangle when hovered over a desktop. This adds the selection rectangle on hover, since it used to be there before three-state design. Currently selected desktop has thinner and different colored border. ![image](/uploads/ad1f2f7acbe602fb7b9479ce859026b7/image.png) ![image](/uploads/9fa50bac4b81958da0b8926f8d2518ba/image.png) ![image](/uploads/3e46c1f5a740c40bbf18a5d887f31d39/image.png) BUG:481812
This commit is contained in:
parent
f6813258ce
commit
181ce590a9
1 changed files with 10 additions and 1 deletions
|
@ -524,7 +524,7 @@ FocusScope {
|
|||
Kirigami.ShadowedTexture {
|
||||
anchors.fill: parent
|
||||
|
||||
color: Kirigami.Theme.highlightColor
|
||||
color: "transparent"
|
||||
source: desktopElement
|
||||
|
||||
radius: Kirigami.Units.largeSpacing * 2 * (overviewVal + gridVal * 2)
|
||||
|
@ -534,6 +534,11 @@ FocusScope {
|
|||
color: Qt.rgba(0, 0, 0, 0.3)
|
||||
yOffset: 3
|
||||
}
|
||||
|
||||
property var borderWidth: desktopHover.hovered ? Kirigami.Units.largeSpacing : (mainBackground.current ? Kirigami.Units.smallSpacing : 0);
|
||||
property var borderColor: desktopHover.hovered ? Kirigami.Theme.focusColor : (mainBackground.current ? Kirigami.Theme.highlightColor : "transparent")
|
||||
border.width: gridVal == 1 ? borderWidth : 0
|
||||
border.color: gridVal == 1 ? borderColor : "transparent"
|
||||
}
|
||||
|
||||
DropArea {
|
||||
|
@ -593,6 +598,10 @@ FocusScope {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
id: desktopHover
|
||||
}
|
||||
}
|
||||
|
||||
WindowHeap {
|
||||
|
|
Loading…
Reference in a new issue