Show message and hide controls if no player is available

Summary: Instead of showing empty controls show a message that no players are available

Test Plan: Use eyes

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12830
This commit is contained in:
Nicolas Fella 2018-07-12 15:22:29 +02:00
parent a19713fbeb
commit f094408171

View file

@ -29,9 +29,17 @@ Kirigami.Page
property QtObject pluginInterface
title: i18n("Multimedia Controls")
Label {
id: noPlayersText
text: i18n("No players available")
anchors.centerIn: parent
visible: pluginInterface.playerList.length == 0
}
ColumnLayout
{
anchors.fill: parent
visible: !noPlayersText.visible
Component.onCompleted: {
pluginInterface.requestPlayerList();