From 8227e4e2b7f034166cbf5efb01e4e715028b4606 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 19 Feb 2018 15:09:06 +0100 Subject: [PATCH] [Run Command] Add history drop down button Indicates that there's a "drop down" history similar to a ComboBox. The fact that you can press the down arrow to bring it up is hardly discoverable. BUG: 375207 FIXED-IN: 5.13.0 Differential Revision: https://phabricator.kde.org/D10652 --- .../contents/runcommand/RunCommand.qml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lookandfeel/contents/runcommand/RunCommand.qml b/lookandfeel/contents/runcommand/RunCommand.qml index bcdb08ac5..6e1006e7f 100644 --- a/lookandfeel/contents/runcommand/RunCommand.qml +++ b/lookandfeel/contents/runcommand/RunCommand.qml @@ -118,6 +118,35 @@ ColumnLayout { Keys.onEscapePressed: { runnerWindow.visible = false } + + PlasmaCore.SvgItem { + anchors { + right: parent.right + rightMargin: 6 // from PlasmaStyle TextFieldStyle + verticalCenter: parent.verticalCenter + } + // match clear button + width: Math.max(parent.height * 0.8, units.iconSizes.small) + height: width + svg: PlasmaCore.Svg { + imagePath: "widgets/arrows" + colorGroup: PlasmaCore.Theme.ButtonColorGroup + } + elementId: "down-arrow" + visible: queryField.length === 0 + + MouseArea { + anchors.fill: parent + onPressed: { + root.showHistory = !root.showHistory + if (root.showHistory) { + listView.forceActiveFocus(); // is the history list + } else { + queryField.forceActiveFocus(); + } + } + } + } } PlasmaComponents.ToolButton { iconSource: "window-close"