mirror of
https://invent.kde.org/network/falkon.git
synced 2024-09-22 02:02:10 +02: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,17 +1345,11 @@ void BrowserWindow::closeEvent(QCloseEvent* event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef Q_OS_MAC
|
saveSettings();
|
||||||
if (mApp->windowCount() == 1) {
|
|
||||||
if (quitApp()) {
|
|
||||||
event->accept();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
event->ignore();
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
#ifndef Q_OS_MAC
|
||||||
}
|
if (mApp->windowCount() == 1)
|
||||||
|
mApp->quitApplication();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
event->accept();
|
event->accept();
|
||||||
|
@ -1385,7 +1379,7 @@ void BrowserWindow::closeWindow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BrowserWindow::quitApp()
|
void BrowserWindow::saveSettings()
|
||||||
{
|
{
|
||||||
if (m_sideBar) {
|
if (m_sideBar) {
|
||||||
saveSideBarWidth();
|
saveSideBarWidth();
|
||||||
|
@ -1399,15 +1393,10 @@ bool BrowserWindow::quitApp()
|
||||||
settings.setValue("WebSearchBarWidth", m_navigationToolbar->splitter()->sizes().at(1));
|
settings.setValue("WebSearchBarWidth", m_navigationToolbar->splitter()->sizes().at(1));
|
||||||
settings.setValue("SideBarWidth", m_sideBarWidth);
|
settings.setValue("SideBarWidth", m_sideBarWidth);
|
||||||
settings.setValue("WebViewWidth", m_webViewWidth);
|
settings.setValue("WebViewWidth", m_webViewWidth);
|
||||||
|
if (!isFullScreen())
|
||||||
if (!isFullScreen()) {
|
|
||||||
settings.setValue("WindowGeometry", saveGeometry());
|
settings.setValue("WindowGeometry", saveGeometry());
|
||||||
}
|
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
mApp->quitApplication();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindow::closeTab()
|
void BrowserWindow::closeTab()
|
||||||
|
|
|
@ -156,7 +156,7 @@ private slots:
|
||||||
void searchOnPage();
|
void searchOnPage();
|
||||||
void changeEncoding();
|
void changeEncoding();
|
||||||
|
|
||||||
bool quitApp();
|
void saveSettings();
|
||||||
void hideNavigationSlot();
|
void hideNavigationSlot();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user