mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
Allow to reset window size from launcher
This commit is contained in:
@@ -378,13 +378,14 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
if (!window) { return false; }
|
if (!window) { return false; }
|
||||||
const QSettings settings("swift-project.org", this->getApplicationName());
|
const QSettings settings("swift-project.org", this->getApplicationName());
|
||||||
|
const QString location = settings.fileName();
|
||||||
|
CLogMessage(this).info(u"GUI settings are here: '%1'") << location;
|
||||||
|
|
||||||
const QByteArray g = settings.value("geometry").toByteArray();
|
const QByteArray g = settings.value("geometry").toByteArray();
|
||||||
const QByteArray s = settings.value("windowState").toByteArray();
|
const QByteArray s = settings.value("windowState").toByteArray();
|
||||||
if (g.isEmpty() || s.isEmpty()) { return false; }
|
if (g.isEmpty() || s.isEmpty()) { return false; }
|
||||||
window->restoreGeometry(g);
|
window->restoreGeometry(g);
|
||||||
window->restoreState(s);
|
window->restoreState(s);
|
||||||
const QString location = settings.fileName();
|
|
||||||
CLogMessage(this).info(u"GUI settings are here: '%1'") << location;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -246,10 +246,8 @@ bool CSwiftLauncher::setSwiftCoreExecutable()
|
|||||||
if (!sGui || sGui->isShuttingDown()) { return false; }
|
if (!sGui || sGui->isShuttingDown()) { return false; }
|
||||||
this->saveSetup();
|
this->saveSetup();
|
||||||
QStringList args = ui->comp_DBusSelector->getDBusCmdLineArgs();
|
QStringList args = ui->comp_DBusSelector->getDBusCmdLineArgs();
|
||||||
if (ui->rb_SwiftCoreAudioOnCore->isChecked())
|
if (ui->rb_SwiftCoreAudioOnCore->isChecked()) { args.append("--coreaudio"); }
|
||||||
{
|
if (ui->cb_resetWindow->isChecked()) { args.append("--resetsize"); }
|
||||||
args.append("--coreaudio");
|
|
||||||
}
|
|
||||||
|
|
||||||
m_executableArgs = sGui->argumentsJoined(args);
|
m_executableArgs = sGui->argumentsJoined(args);
|
||||||
m_executable = CDirectoryUtils::executableFilePath(CBuildConfig::swiftCoreExecutableName());
|
m_executable = CDirectoryUtils::executableFilePath(CBuildConfig::swiftCoreExecutableName());
|
||||||
@@ -273,6 +271,7 @@ bool CSwiftLauncher::setSwiftGuiExecutable()
|
|||||||
"--window", CEnableForFramelessWindow::windowModeToString(getWindowMode())
|
"--window", CEnableForFramelessWindow::windowModeToString(getWindowMode())
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (ui->cb_resetWindow->isChecked()) { args << "--resetsize"; }
|
||||||
if (!this->isStandaloneGuiSelected())
|
if (!this->isStandaloneGuiSelected())
|
||||||
{
|
{
|
||||||
const QString dBus(ui->comp_DBusSelector->getDBusAddress());
|
const QString dBus(ui->comp_DBusSelector->getDBusAddress());
|
||||||
|
|||||||
@@ -559,16 +559,6 @@
|
|||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" colspan="5">
|
|
||||||
<widget class="BlackGui::Components::CScaleScreenFactor" name="comp_Scale">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QToolButton" name="tb_SwiftGui">
|
<widget class="QToolButton" name="tb_SwiftGui">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@@ -701,6 +691,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" colspan="3">
|
||||||
|
<widget class="BlackGui::Components::CScaleScreenFactor" name="comp_Scale">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="cb_resetWindow">
|
||||||
|
<property name="text">
|
||||||
|
<string>reset window</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -756,9 +763,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>BlackGui::COverlayMessagesFrame</class>
|
<class>BlackGui::Components::CDbLoadOverviewComponent</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
<header>blackgui/overlaymessagesframe.h</header>
|
<header>blackgui/components/dbloadoverviewcomponent.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
@@ -768,9 +775,9 @@
|
|||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>BlackGui::Components::CDbLoadOverviewComponent</class>
|
<class>BlackGui::COverlayMessagesFrame</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
<header>blackgui/components/dbloadoverviewcomponent.h</header>
|
<header>blackgui/overlaymessagesframe.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|||||||
Reference in New Issue
Block a user