1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00

Fix quit popup condition

Remove monitor index display for now
because of incorrect index from windows
This commit is contained in:
Elias Steurer 2021-12-18 13:00:18 +01:00
parent a02930ce7b
commit 1eb36a7476
5 changed files with 17 additions and 22 deletions

View File

@ -120,7 +120,7 @@ Item {
text: qsTr("Open Documentation") text: qsTr("Open Documentation")
Material.background: Material.LightGreen Material.background: Material.LightGreen
Material.foreground: "white" highlighted: true
icon.source: "qrc:/assets/icons/icon_document.svg" icon.source: "qrc:/assets/icons/icon_document.svg"
icon.color: "white" icon.color: "white"
icon.width: 16 icon.width: 16

View File

@ -17,7 +17,7 @@ Rectangle {
property alias background: root.color property alias background: root.color
property alias radius: root.radius property alias radius: root.radius
signal requestProjectSettings(int index, var installedType, string appID) signal requestProjectSettings(var index, var installedType, var appID)
function selectOnly(index) { function selectOnly(index) {
for (var i = 0; i < rp.count; i++) { for (var i = 0; i < rp.count; i++) {
@ -142,7 +142,7 @@ Rectangle {
previewImage: m_previewImage previewImage: m_previewImage
installedType: m_installedType installedType: m_installedType
monitorWithoutContentSelectable: root.monitorWithoutContentSelectable monitorWithoutContentSelectable: root.monitorWithoutContentSelectable
onMonitorSelected: root.selectMonitorAt(delegate.index) onMonitorSelected: (index) => root.selectMonitorAt(index)
} }
} }

View File

@ -75,13 +75,6 @@ Item {
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
} }
Text {
font.pointSize: 14
text: root.index
anchors.centerIn: parent
color: "white"
}
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
@ -89,7 +82,7 @@ Item {
onClicked: { onClicked: {
if (monitorWithoutContentSelectable) { if (monitorWithoutContentSelectable) {
monitorSelected(index); monitorSelected(index);
return ; return
} }
if (root.hasContent && !root.monitorWithoutContentSelectable) if (root.hasContent && !root.monitorWithoutContentSelectable)
monitorSelected(index); monitorSelected(index);

View File

@ -92,7 +92,9 @@ Popup {
} else { } else {
videoControlWrapper.state = "hidden"; videoControlWrapper.state = "hidden";
customPropertiesGridView.visible = true; customPropertiesGridView.visible = true;
ScreenPlay.screenPlayManager.requestProjectSettingsAtMonitorIndex(index); if(!ScreenPlay.screenPlayManager.requestProjectSettingsAtMonitorIndex(index)){
console.warn("Unable to get requested settings from index: ", index)
}
} }
activeMonitorIndex = index; activeMonitorIndex = index;
} }
@ -126,12 +128,11 @@ Popup {
Button { Button {
id: btnRemoveSelectedWallpaper id: btnRemoveSelectedWallpaper
text: qsTr("Remove selected")
Material.background: Material.accent Material.background: Material.accent
Material.foreground: "white" highlighted: true
text: qsTr("Remove selected")
font.family: ScreenPlay.settings.font font.family: ScreenPlay.settings.font
enabled: monitorSelection.activeMonitors.length == 1 enabled: monitorSelection.activeMonitors.length == 1 && ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
onClicked: { onClicked: {
if (!ScreenPlay.screenPlayManager.removeWallpaperAt(monitorSelection.activeMonitors[0])) if (!ScreenPlay.screenPlayManager.removeWallpaperAt(monitorSelection.activeMonitors[0]))
print("Unable to close singel wallpaper"); print("Unable to close singel wallpaper");
@ -142,9 +143,9 @@ Popup {
Button { Button {
id: btnRemoveAllWallpape id: btnRemoveAllWallpape
text: qsTr("Remove ") + ScreenPlay.screenPlayManager.activeWallpaperCounter + " " + qsTr("Wallpapers") text: qsTr("Remove all ") + ScreenPlay.screenPlayManager.activeWallpaperCounter + " " + qsTr("Wallpapers")
Material.background: Material.accent Material.background: Material.accent
Material.foreground: "white" highlighted: true
font.family: ScreenPlay.settings.font font.family: ScreenPlay.settings.font
enabled: ScreenPlay.screenPlayManager.activeWallpaperCounter > 0 enabled: ScreenPlay.screenPlayManager.activeWallpaperCounter > 0
onClicked: { onClicked: {
@ -158,9 +159,10 @@ Popup {
Button { Button {
id: btnRemoveAllWidgets id: btnRemoveAllWidgets
text: qsTr("Remove ") + ScreenPlay.screenPlayManager.activeWidgetsCounter + " " + qsTr("Widgets") text: qsTr("Remove all ") + ScreenPlay.screenPlayManager.activeWidgetsCounter + " " + qsTr("Widgets")
Material.background: Material.accent Material.background: Material.accent
Material.foreground: "white" Material.foreground: Material.primaryTextColor
highlighted: true
font.family: ScreenPlay.settings.font font.family: ScreenPlay.settings.font
enabled: ScreenPlay.screenPlayManager.activeWidgetsCounter > 0 enabled: ScreenPlay.screenPlayManager.activeWidgetsCounter > 0
onClicked: { onClicked: {

View File

@ -249,8 +249,8 @@ Rectangle {
icon.width: root.iconWidth icon.width: root.iconWidth
icon.height: root.iconHeight icon.height: root.iconHeight
onClicked: { onClicked: {
if(ScreenPlay.screenPlayManager.activeWallpaperCounter > 0 if(ScreenPlay.screenPlayManager.activeWallpaperCounter === 0
&& ScreenPlay.screenPlayManager.activeWidgetsCounter > 0){ && ScreenPlay.screenPlayManager.activeWidgetsCounter === 0){
Qt.quit() Qt.quit()
return return
} }