mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
Qt: simplify resetGeometry occurances
This commit is contained in:
parent
755ceb50a4
commit
92ec846375
3 changed files with 6 additions and 22 deletions
|
|
@ -1374,17 +1374,11 @@ void main_window::CreateDockWindows()
|
|||
void main_window::ConfigureGuiFromSettings(bool configure_all)
|
||||
{
|
||||
// Restore GUI state if needed. We need to if they exist.
|
||||
QByteArray geometry = guiSettings->GetValue(gui::mw_geometry).toByteArray();
|
||||
if (geometry.isEmpty() == false)
|
||||
if (!restoreGeometry(guiSettings->GetValue(gui::mw_geometry).toByteArray()))
|
||||
{
|
||||
restoreGeometry(geometry);
|
||||
}
|
||||
else
|
||||
{ // By default, set the window to 70% of the screen and the debugger frame is hidden.
|
||||
// By default, set the window to 70% of the screen and the debugger frame is hidden.
|
||||
m_debuggerFrame->hide();
|
||||
|
||||
QSize defaultSize = QDesktopWidget().availableGeometry().size() * 0.7;
|
||||
resize(defaultSize);
|
||||
resize(QDesktopWidget().availableGeometry().size() * 0.7);
|
||||
}
|
||||
|
||||
restoreState(guiSettings->GetValue(gui::mw_windowState).toByteArray());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue