Verified Commit 24b7f69f authored by ivan tkachenko's avatar ivan tkachenko
Browse files

[applets/userswitcher] Replace sophisticated Binding with a conditional expression

It leads to duplicating icon name in both metadata and the code, but
such simplify is well worth it.
parent cadb5eba
......@@ -39,13 +39,8 @@ Item {
Plasmoid.toolTipTextFormat: Text.StyledText
Plasmoid.toolTipSubText: i18n("You are logged in as <b>%1</b>", displayedName)
Binding {
target: Plasmoid.self
property: "icon"
value: kuser.faceIconUrl
// revert to the Plasmoid icon if no face given
when: kuser.faceIconUrl.toString() !== ""
// revert to the Plasmoid icon if no face given
Plasmoid.icon: kuser.faceIconUrl.toString() || "preferences-desktop-user"
KCoreAddons.KUser {
id: kuser
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