diff --git a/applets/kickoff/package/contents/ui/Kickoff.qml b/applets/kickoff/package/contents/ui/Kickoff.qml --- a/applets/kickoff/package/contents/ui/Kickoff.qml +++ b/applets/kickoff/package/contents/ui/Kickoff.qml @@ -49,36 +49,17 @@ Plasmoid.compactRepresentation: MouseArea { id: compactRoot - Layout.maximumWidth: inPanel ? units.iconSizeHints.panel : -1 - Layout.maximumHeight: inPanel ? units.iconSizeHints.panel : -1 + Layout.minimumWidth: root.vertical || !inPanel ? units.iconSizeHints.panel : -1 + Layout.minimumHeight: root.vertical || inPanel ? -1 : units.iconSizeHints.panel + Layout.maximumWidth: inPanel ? Math.min(parent.width, units.iconSizeHints.panel) * buttonIcon.aspectRatio : -1 + Layout.maximumHeight: inPanel ? Math.min(parent.height, units.iconSizeHints.panel) * buttonIcon.aspectRatio : -1 + hoverEnabled: true onClicked: plasmoid.expanded = !plasmoid.expanded onWidthChanged: updateSizeHints() onHeightChanged: updateSizeHints() - function updateSizeHints() { - if (kickoff.vertical) { - var scaledHeight = Math.floor(parent.width * (buttonIcon.implicitHeight / buttonIcon.implicitWidth)); - compactRoot.Layout.minimumHeight = scaledHeight; - compactRoot.Layout.maximumHeight = scaledHeight; - compactRoot.Layout.minimumWidth = units.iconSizes.small; - compactRoot.Layout.maximumWidth = inPanel ? units.iconSizeHints.panel : -1; - } else { - var scaledWidth = Math.floor(parent.height * (buttonIcon.implicitWidth / buttonIcon.implicitHeight)); - compactRoot.Layout.minimumWidth = scaledWidth; - compactRoot.Layout.maximumWidth = scaledWidth; - compactRoot.Layout.minimumHeight = units.iconSizes.small; - compactRoot.Layout.maximumHeight = inPanel ? units.iconSizeHints.panel : -1; - } - } - - Connections { - target: units.iconSizeHints - - onPanelChanged: compactRoot.updateSizeHints() - } - DropArea { id: compactDragArea anchors.fill: parent @@ -102,8 +83,6 @@ active: parent.containsMouse || compactDragArea.containsDrag smooth: true roundToIconSize: aspectRatio === 1 - - onSourceChanged: updateSizeHints() } } diff --git a/containments/desktop/plugins/folder/foldermodel.cpp b/containments/desktop/plugins/folder/foldermodel.cpp --- a/containments/desktop/plugins/folder/foldermodel.cpp +++ b/containments/desktop/plugins/folder/foldermodel.cpp @@ -156,6 +156,7 @@ */ connect(this, &QAbstractItemModel::rowsInserted, this, [this](const QModelIndex &parent, int first, int last) { + qDebug() << "row insert!"; for (int i = first; i <= last; ++i) { const auto idx = index(i, 0, parent); const auto url = itemForIndex(idx).url();