diff --git a/applets/kicker/package/contents/ui/ItemListDelegate.qml b/applets/kicker/package/contents/ui/ItemListDelegate.qml --- a/applets/kicker/package/contents/ui/ItemListDelegate.qml +++ b/applets/kicker/package/contents/ui/ItemListDelegate.qml @@ -35,6 +35,7 @@ signal actionTriggered(string actionId, variant actionArgument) signal aboutToShowActionMenu(variant actionMenu) + readonly property real fullTextWidth: Math.ceil(icon.width + label.implicitWidth + arrow.width + row.anchors.leftMargin + row.anchors.rightMargin + row.actualSpacing) property bool isSeparator: (model.isSeparator == true) property bool hasChildren: (model.hasChildren == true) property bool hasActionList: ((model.favoriteId != null) @@ -177,14 +178,17 @@ } Row { + id: row + anchors.left: parent.left anchors.leftMargin: highlightItemSvg.margins.left anchors.right: parent.right anchors.rightMargin: highlightItemSvg.margins.right height: parent.height spacing: units.smallSpacing * 2 + readonly property real actualSpacing: ((icon.visible ? 1 : 0) * spacing) + ((arrow.visible ? 1 : 0) * spacing) LayoutMirroring.enabled: (Qt.application.layoutDirection == Qt.RightToLeft) @@ -211,8 +215,7 @@ anchors.verticalCenter: parent.verticalCenter - width: (parent.width - icon.width - arrow.width - - ((icon.visible ? 1 : 0) * parent.spacing) - ((arrow.visible ? 1 : 0) * parent.spacing)) + width: parent.width - icon.width - arrow.width - parent.actualSpacing verticalAlignment: Text.AlignVCenter diff --git a/applets/kicker/package/contents/ui/ItemListView.qml b/applets/kicker/package/contents/ui/ItemListView.qml --- a/applets/kicker/package/contents/ui/ItemListView.qml +++ b/applets/kicker/package/contents/ui/ItemListView.qml @@ -27,7 +27,10 @@ FocusScope { id: itemList - width: units.gridUnit * 14 + property real minimumWidth: units.gridUnit * 14 + property real maximumWidth: minimumWidth * 2 + + width: minimumWidth height: listView.contentHeight signal exited @@ -144,7 +147,11 @@ spacing: 0 keyNavigationWraps: (dialog != null) - delegate: ItemListDelegate {} + delegate: ItemListDelegate { + onFullTextWidthChanged: { + if (fullTextWidth > itemList.width) itemList.width = Math.min(fullTextWidth, itemList.maximumWidth); + } + } highlight: PlasmaComponents.Highlight { visible: listView.currentItem && !listView.currentItem.isSeparator diff --git a/applets/kicker/package/contents/ui/MenuRepresentation.qml b/applets/kicker/package/contents/ui/MenuRepresentation.qml --- a/applets/kicker/package/contents/ui/MenuRepresentation.qml +++ b/applets/kicker/package/contents/ui/MenuRepresentation.qml @@ -28,8 +28,8 @@ focus: true Layout.minimumWidth: (sideBar.width + (sideBar.width ? mainRow.spacing : 0) - + Math.max(units.gridUnit * 14, runnerColumns.width)) - Layout.maximumWidth: Layout.minimumWidth + + Math.max(searchField.defaultWidth, runnerColumns.width)) + Layout.maximumWidth: Math.max(mainRow.width, Layout.minimumWidth); // mainRow.width is constrained by rootList.maximumWidth Layout.minimumHeight: Math.max(((rootModel.count - rootModel.separatorCount) * rootList.itemHeight) + (rootModel.separatorCount * rootList.separatorHeight) @@ -175,7 +175,7 @@ anchors.top: parent.top - width: root.width - sideBar.width - mainRow.spacing + minimumWidth: root.Layout.minimumWidth - sideBar.width - mainRow.spacing height: ((rootModel.count - rootModel.separatorCount) * itemHeight) + (rootModel.separatorCount * separatorHeight) visible: (searchField.text == "") @@ -309,7 +309,10 @@ anchors.left: parent.left anchors.leftMargin: sideBar.width + (sideBar.width ? mainRow.spacing : 0) + units.smallSpacing - width: (units.gridUnit * 14) - (2 * units.smallSpacing) + readonly property real defaultWidth: units.gridUnit * 14 + width: (runnerColumnsRepeater.count != 0 ? runnerColumnsRepeater.itemAt(0).width + : (rootList.visible ? rootList.width : defaultWidth)) + - units.smallSpacing focus: true