From 6e516f7c36cad7c0c636a398431d31df8675a016 Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 18 Oct 2017 16:07:34 -0400 Subject: [PATCH] 1.1 Release with new Compact View options --- README.md | 4 +- plasmoid/contents/config/main.xml | 3 ++ plasmoid/contents/ui/CompactView.qml | 2 +- .../contents/ui/config/ConfigAppearance.qml | 51 ++++++++++++++++++- plasmoid/contents/ui/main.qml | 15 ++++-- plasmoid/metadata.desktop | 2 +- 6 files changed, 68 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9a78cf6..3ff6465 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,14 @@ Screenshots ![](screenshots/playlists.png) -MediaCenter Management +MediaCenter Remote Control -------------- * Multi-host/Multi-zone playback control (audio only) * Host address only, access-key support and https support tbd * Zone link * Basic smartlist/playlist playback support * Basic current playing now management -* Panel option to show playback controls and current playing track +* Show playback controls and current playing track directly in a Panel Installation -------------- diff --git a/plasmoid/contents/config/main.xml b/plasmoid/contents/config/main.xml index cba3a28..8039cb3 100644 --- a/plasmoid/contents/config/main.xml +++ b/plasmoid/contents/config/main.xml @@ -35,6 +35,9 @@ true + + 25 + diff --git a/plasmoid/contents/ui/CompactView.qml b/plasmoid/contents/ui/CompactView.qml index 15696d1..68d027b 100644 --- a/plasmoid/contents/ui/CompactView.qml +++ b/plasmoid/contents/ui/CompactView.qml @@ -94,7 +94,7 @@ Item { } PlasmaComponents.Button { - text: "MCWS Remote (click here to connect)" + text: "MCWS Remote" visible: !mcws.isConnected onClicked: plasmoid.expanded = !plasmoid.expanded } diff --git a/plasmoid/contents/ui/config/ConfigAppearance.qml b/plasmoid/contents/ui/config/ConfigAppearance.qml index e75f9a8..b25cc49 100644 --- a/plasmoid/contents/ui/config/ConfigAppearance.qml +++ b/plasmoid/contents/ui/config/ConfigAppearance.qml @@ -1,6 +1,7 @@ import QtQuick 2.2 import QtQuick.Controls 1.2 import QtQuick.Layouts 1.0 +import org.kde.plasma.components 2.0 as PlasmaComponents Item { @@ -12,6 +13,23 @@ Item { property alias cfg_autoShuffle: autoShuffle.checked property alias cfg_advancedTrayView: advTrayView.checked + property int cfg_trayViewSize + + onCfg_trayViewSizeChanged: { + switch (cfg_trayViewSize) { + case 25: + normalSize.checked = true; + break; + case 60: + wideSize.checked = true; + break; + case 9999: + extraWideSize.checked = true; + break; + default: + } + } + GroupBox { flat: true @@ -43,14 +61,43 @@ Item { CheckBox { id: abbrevZoneView text: "Abbreviated Zone View" + Layout.columnSpan: 2 } + Label{Layout.columnSpan: 2} + Rectangle { + height: 1 + Layout.columnSpan: 2 + Layout.fillWidth: true + } + + Label{Layout.columnSpan: 2} + CheckBox { id: advTrayView - text: "Show Advanced Panel View\n(only in horizontal panels)" + Layout.columnSpan: 2 + text: "Show Advanced Panel View (only in horizontal panels)" + } + PlasmaComponents.ButtonRow { + Layout.columnSpan: 2 + PlasmaComponents.RadioButton { + id: normalSize + text: "Normal View" + onClicked: cfg_trayViewSize = 25 + } + PlasmaComponents.RadioButton { + id: wideSize + text: "Wide View" + onClicked: cfg_trayViewSize = 60 + } + PlasmaComponents.RadioButton { + id: extraWideSize + text: "Ludicrous Wide View" + onClicked: cfg_trayViewSize = 9999 + } } Label{Layout.columnSpan: 2} Rectangle { - height: 3 + height: 1 Layout.columnSpan: 2 Layout.fillWidth: true } diff --git a/plasmoid/contents/ui/main.qml b/plasmoid/contents/ui/main.qml index 30bfd43..b8faff0 100644 --- a/plasmoid/contents/ui/main.qml +++ b/plasmoid/contents/ui/main.qml @@ -1,6 +1,7 @@ import QtQuick 2.8 import QtQuick.Layouts 1.3 import QtQuick.Controls 2.2 as QtControls +import QtQuick.Window 2.2 import org.kde.plasma.core 2.1 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents @@ -17,6 +18,8 @@ Item { id: root property bool advTrayView: plasmoid.configuration.advancedTrayView + property int trayViewSize: plasmoid.configuration.trayViewSize + property bool vertical: (plasmoid.formFactor === PlasmaCore.Types.Vertical) property int currentZone: -1 @@ -45,9 +48,15 @@ Item { Plasmoid.compactRepresentation: Loader { - Layout.preferredWidth: (advTrayView && !vertical) - ? theme.mSize(theme.defaultFont).width * 24 - : units.iconSizes.medium + Layout.preferredWidth: { + if (advTrayView && !vertical) { + return (trayViewSize === 9999) + ? Screen.width-25 + : theme.mSize(theme.defaultFont).width * trayViewSize + } + else + return units.iconSizes.medium + } sourceComponent: (advTrayView && !vertical) ? advComp : iconComp } diff --git a/plasmoid/metadata.desktop b/plasmoid/metadata.desktop index 97b6d54..7cd5359 100644 --- a/plasmoid/metadata.desktop +++ b/plasmoid/metadata.desktop @@ -9,7 +9,7 @@ X-KDE-PluginInfo-Email=noeerover@gmail.com X-KDE-PluginInfo-EnabledByDefault=true X-KDE-PluginInfo-License=MIT X-KDE-PluginInfo-Name=org.kde.mcwsremote -X-KDE-PluginInfo-Version=1.0 +X-KDE-PluginInfo-Version=1.1 X-KDE-PluginInfo-Website=https://github.com/noee/mcwsplasmoid X-KDE-ServiceTypes=Plasma/Applet X-Plasma-API=declarativeappletscript