Changeset View
Changeset View
Standalone View
Standalone View
app/mainwindow.cpp
Context not available. | |||||
1062 | 1062 | | |||
---|---|---|---|---|---|
1063 | void MainWindow::changeEvent(QEvent* event) | 1063 | void MainWindow::changeEvent(QEvent* event) | ||
1064 | { | 1064 | { | ||
1065 | if (event->type() == QEvent::WindowStateChange | 1065 | if (event->type() == QEvent::WindowStateChange) | ||
1066 | && (windowState() & Qt::WindowMaximized) | | |||
1067 | && Settings::width() != 100 | | |||
1068 | && Settings::height() != 100) | | |||
1069 | { | 1066 | { | ||
1070 | Settings::setWidth(100); | 1067 | if ((windowState() & Qt::WindowMaximized)) | ||
1071 | Settings::setHeight(100); | 1068 | { | ||
1072 | 1069 | /* Maximization has not being saving to Settings as it seems | |||
1073 | applyWindowGeometry(); | 1070 | * reasonable and has simplier implementation. | ||
1074 | 1071 | * */ | |||
1075 | updateWindowWidthMenu(); | 1072 | setWindowGeometry(100, 100, Settings::position()); | ||
1076 | updateWindowHeightMenu(); | 1073 | setWindowState(Qt::WindowMaximized); | ||
1074 | } else { | ||||
1075 | setWindowGeometry(Settings::width(), Settings::height(), Settings::position()); | ||||
1076 | } | ||||
1077 | } | 1077 | } | ||
1078 | 1078 | | |||
1079 | KMainWindow::changeEvent(event); | 1079 | KMainWindow::changeEvent(event); | ||
Context not available. |