You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
889 B
29 lines
889 B
/* |
|
* SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com> |
|
* SPDX-FileCopyrightText: 2020 Andrey Butirsky <butirsky@gmail.com> |
|
* SPDX-License-Identifier: GPL-2.0-or-later |
|
*/ |
|
|
|
import QtQuick 2.12 |
|
import org.kde.plasma.components 3.0 as PlasmaComponents3 |
|
import org.kde.plasma.workspace.keyboardlayout 1.0 |
|
|
|
PlasmaComponents3.ToolButton { |
|
id: kbLayoutButton |
|
|
|
property alias layoutShortName: layout.layoutDisplayName |
|
property alias layoutLongName: layout.layoutLongName |
|
readonly property bool hasMultipleKeyboardLayouts: layout.layouts.length > 1 |
|
|
|
text: layoutLongName |
|
visible: hasMultipleKeyboardLayouts |
|
|
|
Accessible.name: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to change keyboard layout", "Switch layout") |
|
icon.name: "input-keyboard" |
|
|
|
onClicked: layout.switchToNextLayout() |
|
|
|
KeyboardLayout { |
|
id: layout |
|
} |
|
}
|
|
|