From f09440817160a3ef59c57ae5e707a497ff84d9aa Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Thu, 12 Jul 2018 15:22:29 +0200 Subject: [PATCH] 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 --- app/qml/mpris.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/qml/mpris.qml b/app/qml/mpris.qml index 9c7c1e1c4..53c9538fa 100644 --- a/app/qml/mpris.qml +++ b/app/qml/mpris.qml @@ -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();