Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 40cc6c35 authored by Michail Vourlakos's avatar Michail Vourlakos

improve positioning for highlight in systray

Summary:
--the highlight item used in the systray now uses
the panel thickness for correct positioning. In
the past there were cases that the highlight item
wasnt shown at all or was positioned a bit far from
the panel edge

Test Plan:
use the systray and investigate that highlight item
is positioned correctly

Reviewers: #plasma, mart, davidedmundson

Reviewed By: mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D5927
parent 8eb03288
......@@ -18,6 +18,7 @@
*/
import QtQuick 2.1
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
PlasmaCore.FrameSvgItem {
......@@ -27,10 +28,15 @@ PlasmaCore.FrameSvgItem {
property Item target
property int location
x: Math.max(0, (target ? target.x : 0) + (visualParent ? visualParent.x : 0))
y: Math.max(0, (target ? target.y : 0) + (visualParent ? visualParent.y : 0))
width: Math.min(parent.width, target ? target.width : 0)
height: Math.min(parent.height, target ? target.height : 0)
//! when the target is the root item we use the maximum thickness of the panel
x: plasmoid.formFactor === PlasmaCore.Types.Vertical && target === root ?
0 : Math.max(0, (target ? target.x : 0) + (visualParent ? visualParent.x : 0))
y: plasmoid.formFactor === PlasmaCore.Types.Horizontal && target === root ?
0 : Math.max(0, (target ? target.y : 0) + (visualParent ? visualParent.y : 0))
width: plasmoid.formFactor === PlasmaCore.Types.Vertical && target === root ?
parent.width : Math.min(parent.width, target ? target.width : 0)
height: plasmoid.formFactor === PlasmaCore.Types.Horizontal && target === root ?
parent.height : Math.min(parent.height, target ? target.height : 0)
imagePath: "widgets/tabbar"
prefix: {
......
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