Changeset View
Changeset View
Standalone View
Standalone View
sddm-theme/KeyboardButton.qml
1 | import QtQuick 2.2 | 1 | import QtQuick 2.2 | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | import org.kde.plasma.core 2.0 as PlasmaCore | 3 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
4 | import org.kde.plasma.components 2.0 as PlasmaComponents | 4 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
5 | 5 | | |||
6 | import QtQuick.Controls 1.3 as QQC | 6 | import QtQuick.Controls 1.3 as QQC | ||
7 | 7 | | |||
8 | PlasmaComponents.ToolButton { | 8 | PlasmaComponents.ToolButton { | ||
9 | id: keyboardButton | 9 | id: keyboardButton | ||
10 | 10 | | |||
11 | property int currentIndex: -1 | 11 | property int currentIndex: -1 | ||
12 | 12 | | |||
13 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", instantiator.objectAt(currentIndex).shortName) | 13 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Keyboard Layout: %1", instantiator.objectAt(currentIndex).shortName) | ||
14 | implicitWidth: minimumWidth | 14 | implicitWidth: minimumWidth | ||
15 | font.pointSize: config.fontSize | ||||
15 | 16 | | |||
16 | visible: menu.items.length > 1 | 17 | visible: menu.items.length > 1 | ||
17 | 18 | | |||
18 | Component.onCompleted: currentIndex = Qt.binding(function() {return keyboard.currentLayout}); | 19 | Component.onCompleted: currentIndex = Qt.binding(function() {return keyboard.currentLayout}); | ||
19 | 20 | | |||
20 | menu: QQC.Menu { | 21 | menu: QQC.Menu { | ||
21 | id: keyboardMenu | 22 | id: keyboardMenu | ||
22 | Instantiator { | 23 | Instantiator { | ||
Show All 14 Lines |