1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00

Fix silent startup inverted logic

Remove center calculation casing buggy behavior on 4k Screens
This commit is contained in:
Elias Steurer 2019-10-28 18:35:42 +01:00
parent 187d7ed64a
commit 92570a13fe
2 changed files with 8 additions and 17 deletions

View File

@ -60,7 +60,7 @@ App::App()
m_installedListModel->init();
// Set visible if the -silent parameter was not set
if (!QGuiApplication::instance()->arguments().contains("-silent")) {
if (QGuiApplication::instance()->arguments().contains("-silent")) {
settings()->setSilentStart(true);
}

View File

@ -16,7 +16,7 @@ import "qml/Navigation"
ApplicationWindow {
id: window
color: "#eeeeee"
// Set visible if the -silent parameter was not set (see main.cpp:19).
// Set visible if the -silent parameter was not set (see app.cpp end of constructor).
visible: false
width: 1400
height: 788
@ -25,11 +25,13 @@ ApplicationWindow {
minimumWidth: 1050
Component.onCompleted: {
if (! ScreenPlay.settings.autostart) {
show()
if(!ScreenPlay.settings.silentStart){
window.show()
}
}
function switchPage(name) {
if (name === "Create") {
bg.state = "create"
@ -37,7 +39,6 @@ ApplicationWindow {
pageLoaderCreate.visible = true
pageLoaderWorkshop.visible = false
pageLoaderCreate.setSource("qrc:/qml/Create/Create.qml")
sidebar.state = "inactive"
pageLoaderCreate.item.checkFFMPEG()
} else if (name === "Workshop") {
bg.state = "init"
@ -45,22 +46,21 @@ ApplicationWindow {
pageLoaderCreate.visible = false
pageLoaderWorkshop.visible = true
pageLoaderWorkshop.setSource("qrc:/qml/Workshop/Workshop.qml")
sidebar.state = "inactive"
} else if (name === "Community") {
bg.state = "community"
pageLoader.visible = true
pageLoaderCreate.visible = false
pageLoaderWorkshop.visible = false
pageLoader.setSource("qrc:/qml/Community/Community.qml")
sidebar.state = "inactive"
} else {
bg.state = "init"
pageLoader.visible = true
pageLoaderCreate.visible = false
pageLoaderWorkshop.visible = false
pageLoader.setSource("qrc:/qml/" + name + "/" + name + ".qml")
sidebar.state = "inactive"
}
sidebar.state = "inactive"
}
Background {
@ -68,15 +68,6 @@ ApplicationWindow {
anchors.fill: parent
}
Connections {
target: ScreenPlay.settings
onSetMainWindowVisible: {
window.visible = visible
setX(Screen.width / 2 - width / 2)
setY(Screen.height / 2 - height / 2)
}
}
Connections {
target: ScreenPlay.util
onRequestNavigation: {