diff --git a/containments/desktop/package/contents/ui/FolderItemDelegate.qml b/containments/desktop/package/contents/ui/FolderItemDelegate.qml --- a/containments/desktop/package/contents/ui/FolderItemDelegate.qml +++ b/containments/desktop/package/contents/ui/FolderItemDelegate.qml @@ -138,12 +138,6 @@ PlasmaCore.ToolTipArea { id: toolTip - x: frameLoader.x + Math.min(icon.x, label.x) - y: frameLoader.y + icon.y - - width: Math.max(icon.width, label.width) - height: (label.y + label.paintedHeight) - active: (plasmoid.configuration.toolTips && popupDialog == null && !model.blank) interactive: false location: root.useListViewMode ? (plasmoid.location == PlasmaCore.Types.LeftEdge ? PlasmaCore.Types.LeftEdge : PlasmaCore.Types.RightEdge) : plasmoid.location @@ -162,6 +156,41 @@ main.GridView.view.hoveredItem = main; } } + + states: [ + State { // icon view + when: !root.useListViewMode + + AnchorChanges { + target: toolTip + anchors.horizontalCenter: parent.horizontalCenter + } + + PropertyChanges { + target: toolTip + x: undefined + y: frameLoader.y + icon.y + width: Math.max(icon.paintedWidth, label.paintedWidth) + height: (label.y + label.paintedHeight) - y + } + }, + State { // list view + when: root.useListViewMode + + AnchorChanges { + target: toolTip + anchors.horizontalCenter: undefined + } + + PropertyChanges { + target: toolTip + x: frameLoader.x + y: frameLoader.y + width: frameLoader.width + height: frameLoader.height + } + } + ] } Loader {