Commit 84182a55 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

[applets/Task Manager] Refine tooltip highlight effect

Summary:
This patch indents the window thumbnail and album art view by one pixel,
ensuring that the edges of the tooltip effect which is drawn under it are
never completely covered up and improving consistency between contents.

BUG: 416390
FIXED-IN: 5.18.0

Test Plan:
Just a window thumbnail:
Before: {F7912722}
After: {F7912726}

Player controls + icon:
Before: {F7980456}
After: {F7980448}

Player controls + window thumbnail:
Before: {F7980465}
After: {F7980472}

Player controls + album art
Before: {F7980454}
After: {F7980450}

Reviewers: #plasma, #vdg, filipf, ndavis

Reviewed By: #vdg, filipf, ndavis

Subscribers: trmdi, filipf, ndavis, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26739
parent 7a727fde
......@@ -179,14 +179,15 @@ Column {
property int winId: isWin && windows[flatIndex] !== undefined ? windows[flatIndex] : 0
PlasmaComponents.Highlight {
anchors.fill: parent
anchors.fill: hoverHandler
visible: hoverHandler.containsMouse
pressed: hoverHandler.containsPress
}
PlasmaCore.WindowThumbnail {
anchors.fill: parent
anchors.margins: units.smallSpacing
anchors.fill: hoverHandler
// Indent by one pixel to make sure we never cover up the entire highlight
anchors.margins: 1
visible: !albumArtImage.visible && !thumbnailSourceItem.isMinimized
winId: thumbnailSourceItem.winId
......@@ -212,8 +213,9 @@ Column {
// also Image.Loading to prevent loading thumbnails just because the album art takes a split second to load
readonly property bool available: status === Image.Ready || status === Image.Loading
height: thumbnail.height - playerControlsLoader.realHeight
anchors.horizontalCenter: parent.horizontalCenter
anchors.fill: hoverHandler
// Indent by one pixel to make sure we never cover up the entire highlight
anchors.margins: 1
sourceSize: Qt.size(parent.width, parent.height)
asynchronous: true
......@@ -236,6 +238,8 @@ Column {
ToolTipWindowMouseArea {
id: hoverHandler
anchors.fill: parent
// Don't go under the player controls bar, when it's visible
anchors.bottomMargin: playerControlsLoader.realHeight
rootTask: parentTask
modelIndex: submodelIndex
winId: thumbnailSourceItem.winId
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment