mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
ensured the window geometry is remembered on OS X
* ensured the window geometry is remembered on OS X It was always starting based on: int windowWidth = desktop->availableGeometry().width() / 1.3; int windowHeight = desktop->availableGeometry().height() / 1.3; because quitApp isn’t called on OS X. * ensured the window geometry is remembered on OS X (v2) * tweaked coding style
This commit is contained in:
parent
209ba1f44c
commit
effda91f7c
|
@ -1345,18 +1345,12 @@ void BrowserWindow::closeEvent(QCloseEvent* event)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
if (mApp->windowCount() == 1) {
|
||||
if (quitApp()) {
|
||||
event->accept();
|
||||
}
|
||||
else {
|
||||
event->ignore();
|
||||
}
|
||||
saveSettings();
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifndef Q_OS_MAC
|
||||
if (mApp->windowCount() == 1)
|
||||
mApp->quitApplication();
|
||||
#endif
|
||||
|
||||
event->accept();
|
||||
}
|
||||
|
@ -1385,7 +1379,7 @@ void BrowserWindow::closeWindow()
|
|||
}
|
||||
}
|
||||
|
||||
bool BrowserWindow::quitApp()
|
||||
void BrowserWindow::saveSettings()
|
||||
{
|
||||
if (m_sideBar) {
|
||||
saveSideBarWidth();
|
||||
|
@ -1399,15 +1393,10 @@ bool BrowserWindow::quitApp()
|
|||
settings.setValue("WebSearchBarWidth", m_navigationToolbar->splitter()->sizes().at(1));
|
||||
settings.setValue("SideBarWidth", m_sideBarWidth);
|
||||
settings.setValue("WebViewWidth", m_webViewWidth);
|
||||
|
||||
if (!isFullScreen()) {
|
||||
if (!isFullScreen())
|
||||
settings.setValue("WindowGeometry", saveGeometry());
|
||||
}
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
mApp->quitApplication();
|
||||
return true;
|
||||
}
|
||||
|
||||
void BrowserWindow::closeTab()
|
||||
|
|
|
@ -156,7 +156,7 @@ private slots:
|
|||
void searchOnPage();
|
||||
void changeEncoding();
|
||||
|
||||
bool quitApp();
|
||||
void saveSettings();
|
||||
void hideNavigationSlot();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue
Block a user