1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 10:42:29 +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")
Material.background: Material.LightGreen
Material.foreground: "white"
highlighted: true
icon.source: "qrc:/assets/icons/icon_document.svg"
icon.color: "white"
icon.width: 16

View File

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

View File

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

View File

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

View File

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