diff --git a/ScreenPlay/assets/icons/icon_monitor.svg b/ScreenPlay/assets/icons/icon_monitor.svg index 85c390a2..4d31d2d3 100644 --- a/ScreenPlay/assets/icons/icon_monitor.svg +++ b/ScreenPlay/assets/icons/icon_monitor.svg @@ -1 +1,10 @@ - \ No newline at end of file + + + + + + + + + + diff --git a/ScreenPlay/qml/Navigation/NavigationWallpaperConfiguration.qml b/ScreenPlay/qml/Navigation/NavigationWallpaperConfiguration.qml index 92ac31a4..48759582 100644 --- a/ScreenPlay/qml/Navigation/NavigationWallpaperConfiguration.qml +++ b/ScreenPlay/qml/Navigation/NavigationWallpaperConfiguration.qml @@ -6,96 +6,121 @@ import ScreenPlay 1.0 import "../Common" Item { - id: navigationWallpaperConfiguration + id: root - width: 450 - states: [] - transitions: [] + width: 390 + property bool active: ScreenPlay.screenPlayManager.activeWallpaperCounter > 0 anchors { top: parent.top right: parent.right + rightMargin: 20 bottom: parent.bottom } - RippleEffect { - id: rippleEffect - - target: navigationWallpaperConfiguration - } - Connections { function onActiveWallpaperCounterChanged() { - rippleEffect.trigger(); + rippleEffect.trigger() } target: ScreenPlay.screenPlayManager } - Image { - id: image + Pane { + anchors.centerIn: parent + contentWidth: activeMonitorName.contentWidth + image.width + 80 + contentHeight: parent.height - 10 + background: Item { + Rectangle { + id: bg + clip: true + anchors { + fill: parent + margins: 16 + } + color: "transparent" + border.color: root.active ? Material.accentColor : Material.iconDisabledColor + border.width: 1 + radius: 3 + } - width: 24 - height: 24 - source: "qrc:/assets/icons/icon_monitor.svg" + RippleEffect { + id: rippleEffect - anchors { - rightMargin: 30 - right: parent.right - verticalCenter: parent.verticalCenter - } - - Text { - id: txtAmountActiveWallpapers - - text: ScreenPlay.screenPlayManager.activeWallpaperCounter + ScreenPlay.screenPlayManager.activeWidgetsCounter - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - color: Material.accent - font.pointSize: 10 - font.bold: true - font.family: ScreenPlay.settings.font - - anchors { - horizontalCenter: parent.horizontalCenter - top: parent.top - topMargin: 1 + target: bg } } - } - - Text { - id: activeMonitorName - - horizontalAlignment: Text.AlignRight - color: Material.foreground - font.pointSize: 12 - font.family: ScreenPlay.settings.font - text: { - if (ScreenPlay.screenPlayManager.activeWallpaperCounter > 0) - return qsTr("Configurate active Wallpaper or Widgets"); - else - return qsTr("No active Wallpaper or Widgets"); + Behavior on contentWidth { + PropertyAnimation { + duration: 250 + easing.type: Easing.InOutQuart + } } - anchors { - right: image.right - rightMargin: 30 - verticalCenter: parent.verticalCenter + Text { + id: activeMonitorName + + horizontalAlignment: Text.AlignRight + color: root.active ? Material.primaryTextColor : Material.iconDisabledColor + font.pointSize: 12 + font.family: ScreenPlay.settings.font + text: root.active ? qsTr("Configurate active Wallpaper or Widgets") : qsTr( + "No active Wallpaper or Widgets") + + anchors { + right: image.right + rightMargin: 50 + verticalCenter: parent.verticalCenter + } } - } + Image { + id: image - MouseArea { - id: ma + width: 28 + height: 24 + source: "qrc:/assets/icons/icon_monitor.svg" + layer { + effect: ColorOverlay { + color:root.active ? Material.color(Material.Orange) : Material.iconDisabledColor + } + } - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - ScreenPlay.util.setToggleWallpaperConfiguration(); + anchors { + rightMargin: 30 + right: parent.right + verticalCenter: parent.verticalCenter + } + + Text { + id: txtAmountActiveWallpapers + + text: ScreenPlay.screenPlayManager.activeWallpaperCounter + + ScreenPlay.screenPlayManager.activeWidgetsCounter + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + color:root.active ? Material.color(Material.Orange) : Material.iconDisabledColor + font.pointSize: 10 + font.bold: true + font.family: ScreenPlay.settings.font + anchors { + horizontalCenter: parent.horizontalCenter + bottom: parent.bottom + bottomMargin: 7 + } + } + } + + MouseArea { + id: ma + + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { + ScreenPlay.util.setToggleWallpaperConfiguration() + } } } - }