1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-01 01:17:51 +03:00

support focuscope in config window

--the user can use Esc to close the config window
and arrows to navigate between different tabs
This commit is contained in:
Michail Vourlakos 2017-11-20 19:23:45 +02:00
parent 5b1d35d25b
commit 51d6a85389

View File

@ -35,9 +35,8 @@ import org.kde.kquickcontrolsaddons 2.0 as KQuickControlAddons
import org.kde.latte 0.1 as Latte
PlasmaCore.FrameSvgItem {
FocusScope {
id: dialog
imagePath: "dialogs/background"
property int maxWidth: 34 * theme.defaultFont.pixelSize
width: maxWidth + units.smallSpacing * 2
@ -48,6 +47,11 @@ PlasmaCore.FrameSvgItem {
property bool panelIsVertical: plasmoid.formFactor === PlasmaCore.Types.Vertical
property int subGroupSpacing: units.largeSpacing + units.smallSpacing * 1.5
PlasmaCore.FrameSvgItem{
anchors.fill: parent
imagePath: "dialogs/background"
}
PlasmaComponents.ToolButton {
id: pinButton
@ -93,6 +97,12 @@ PlasmaCore.FrameSvgItem {
anchors.top: parent.top
spacing: units.smallSpacing
Keys.onPressed: {
if (event.key === Qt.Key_Escape) {
dockConfig.hideConfigWindow();
}
}
RowLayout {
id: header
Layout.fillWidth: true
@ -215,6 +225,8 @@ PlasmaCore.FrameSvgItem {
visible: plasmoid.configuration.advanced
}
Component.onCompleted: forceActiveFocus();
}
Rectangle {