display: PlasmaComponents3.AbstractButton.IconOnly
icon.name: model.iconName
icon.height: Kirigami.Units.iconSizes.smallMedium
- text: model.identity
+ text: model.isMultiplexer ? i18nc("@action:button", "Choose player automatically") : model.identity
// Keep the delegate centered by offsetting the padding removed in the parent
bottomPadding: verticalPadding + headerItem.bottomPadding
topPadding: verticalPadding - headerItem.bottomPadding
return container->instancePid();
case KDEPidRole:
return container->kdePid();
+ case IsMultiplexerRole:
+ return false;
case ContainerRole:
return QVariant::fromValue(container);
default:
{IdentityRole, QByteArrayLiteral("identity")},
{IconNameRole, QByteArrayLiteral("iconName")},
{KDEPidRole, QByteArrayLiteral("kdePid")},
+ {IsMultiplexerRole, QByteArrayLiteral("isMultiplexer")},
{ContainerRole, QByteArrayLiteral("container")},
};
}
}
switch (role) {
- case Mpris2SourceModel::IdentityRole:
- return i18nc("@action:button", "Choose player automatically");
case Mpris2SourceModel::IconNameRole:
return QStringLiteral("emblem-favorite");
+ case Mpris2SourceModel::IsMultiplexerRole:
+ return true;
default:
return Mpris2SourceModel::dataFromPlayer(m_activePlayer, role);
}