mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 17:02:56 +00:00
Ladybird: Remember window position and size on close
This commit is contained in:
parent
bf927344fb
commit
b7b02693b9
Notes:
sideshowbarker
2024-07-17 03:51:15 +09:00
Author: https://github.com/bplaat
Commit: b7b02693b9
Pull-request: https://github.com/SerenityOS/serenity/pull/20452
Reviewed-by: https://github.com/trflynn89 ✅
5 changed files with 63 additions and 1 deletions
|
@ -695,4 +695,13 @@ bool BrowserWindow::eventFilter(QObject* obj, QEvent* event)
|
|||
return QMainWindow::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
void BrowserWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
s_settings->set_last_position(pos());
|
||||
s_settings->set_last_size(size());
|
||||
s_settings->set_is_maximized(isMaximized());
|
||||
|
||||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue