Skip to content

Commit

Permalink
1.1 Release with new Compact View options
Browse files Browse the repository at this point in the history
  • Loading branch information
noee committed Oct 18, 2017
1 parent cc6208e commit 6e516f7
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------
Expand Down
3 changes: 3 additions & 0 deletions plasmoid/contents/config/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
<entry name="advancedTrayView" type="Bool">
<default>true</default>
</entry>
<entry name="trayViewSize" type="Int">
<default>25</default>
</entry>
</group>

</kcfg>
2 changes: 1 addition & 1 deletion plasmoid/contents/ui/CompactView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
51 changes: 49 additions & 2 deletions plasmoid/contents/ui/config/ConfigAppearance.qml
Original file line number Diff line number Diff line change
@@ -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 {

Expand All @@ -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

Expand Down Expand Up @@ -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
}
Expand Down
15 changes: 12 additions & 3 deletions plasmoid/contents/ui/main.qml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion plasmoid/metadata.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ [email protected]
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
Expand Down

0 comments on commit 6e516f7

Please sign in to comment.