Change window highlight style in WindowHeapDelegate
Currently FrameSvgItem is used to highlight selected or hovered windows. But the problem with it is that it's a bit heavyweight. As a way around it, we could put it in a Loader, but that's going to be bring a set of other challenges. As an alternative solution, this change replaces FrameSvgItem with a simple outline. It still produces decent visuals and it's simpler.
This commit is contained in:
parent
4ad5670ddf
commit
a7987f5a33
1 changed files with 8 additions and 11 deletions
|
@ -127,17 +127,14 @@ Item {
|
|||
thumb.windowHeap.deleteDND(thumb.window.internalId);
|
||||
}
|
||||
|
||||
KSvg.FrameSvgItem {
|
||||
anchors {
|
||||
fill: parent
|
||||
topMargin: -Kirigami.Units.smallSpacing * 2
|
||||
leftMargin: -Kirigami.Units.smallSpacing * 2
|
||||
rightMargin: -Kirigami.Units.smallSpacing * 2
|
||||
bottomMargin: -(Math.round(icon.height / 4) + (thumb.windowTitleVisible ? caption.height : 0) + (Kirigami.Units.smallSpacing * 2))
|
||||
}
|
||||
imagePath: "widgets/viewitem"
|
||||
prefix: "hover"
|
||||
z: -1
|
||||
// Not using FrameSvg hover element intentionally for stylistic reasons
|
||||
Rectangle {
|
||||
border.width: Kirigami.Units.largeSpacing
|
||||
border.color: Kirigami.Theme.highlightColor
|
||||
anchors.fill: parent
|
||||
anchors.margins: -border.width
|
||||
radius: border.width
|
||||
color: "transparent"
|
||||
visible: !thumb.windowHeap.dragActive && (hoverHandler.hovered || (thumb.selected && Window.window.activeFocusItem)) && windowHeap.effectiveOrganized
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue