Changeset View
Changeset View
Standalone View
Standalone View
sddm-theme/KeyboardButton.qml
Show All 14 Lines | 8 | PlasmaComponents.ToolButton { | |||
---|---|---|---|---|---|
15 | font.pointSize: config.fontSize | 15 | font.pointSize: config.fontSize | ||
16 | 16 | | |||
17 | visible: menu.items.length > 1 | 17 | visible: menu.items.length > 1 | ||
18 | 18 | | |||
19 | Component.onCompleted: currentIndex = Qt.binding(function() {return keyboard.currentLayout}); | 19 | Component.onCompleted: currentIndex = Qt.binding(function() {return keyboard.currentLayout}); | ||
20 | 20 | | |||
21 | menu: QQC.Menu { | 21 | menu: QQC.Menu { | ||
22 | id: keyboardMenu | 22 | id: keyboardMenu | ||
23 | style: BreezeMenuStyle {} | ||||
23 | Instantiator { | 24 | Instantiator { | ||
filipf: One more thing that I realized is missing here and that would make everything look like the… | |||||
24 | id: instantiator | 25 | id: instantiator | ||
25 | model: keyboard.layouts | 26 | model: keyboard.layouts | ||
26 | onObjectAdded: keyboardMenu.insertItem(index, object) | 27 | onObjectAdded: keyboardMenu.insertItem(index, object) | ||
27 | onObjectRemoved: keyboardMenu.removeItem( object ) | 28 | onObjectRemoved: keyboardMenu.removeItem( object ) | ||
28 | delegate: QQC.MenuItem { | 29 | delegate: QQC.MenuItem { | ||
29 | text: modelData.longName | 30 | text: modelData.longName | ||
30 | property string shortName: modelData.shortName | 31 | property string shortName: modelData.shortName | ||
31 | onTriggered: { | 32 | onTriggered: { | ||
32 | keyboard.currentLayout = model.index | 33 | keyboard.currentLayout = model.index | ||
33 | } | 34 | } | ||
34 | } | 35 | } | ||
35 | } | 36 | } | ||
36 | } | 37 | } | ||
37 | } | 38 | } | ||
We still need to remove this bit of hardcoding: color: PlasmaCore.ColorScope.highlightColor and in the other file as well, of course. filipf: We still need to remove this bit of hardcoding:
`color: PlasmaCore.ColorScope.highlightColor`… |
One more thing that I realized is missing here and that would make everything look like the desktop menus is a 1px border.
Now the stolen code should sort of look like this:
Unfortunately for some reason rgba fails when using dark themes and the border just turns white. Maybe you could figure out something better, but if you get stuck it's not super important.