Verified Commit 366491da authored by ivan tkachenko's avatar ivan tkachenko
Browse files

Revert "[sddm-theme] Clean up footer buttons code"

This partially reverts commit d2bb4807.

Something unhealthy is going on with that lastIndex that prevents it
from functioning normally when currentIndex is bound to it from the
beginning. Maybe it just needs an on*Changed() signal, so that the
instantiator has already created its objects by that time? Session button
is different from keyboard layouts button which uses pre-baked QList as
its model.
parent cea28ac9
Pipeline #178007 passed with stage
in 13 minutes and 29 seconds
......@@ -13,11 +13,14 @@ import org.kde.plasma.components 3.0 as PlasmaComponents
PlasmaComponents.ToolButton {
id: root
property int currentIndex: sessionModel.lastIndex
property int currentIndex: -1
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Desktop Session: %1", instantiator.objectAt(currentIndex).text || "")
visible: menu.count > 1
Component.onCompleted: {
currentIndex = sessionModel.lastIndex
checkable: true
checked: menu.opened
onToggled: {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment