summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-07-30 13:59:28 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-07-30 13:59:28 +0300
commit622fc3f9c38a9226b3de7dcb3c0f5e52927560de (patch)
tree82364ea91ddf8e5813b04601cb1fb58c6cfac229 /include
parentFix small timestamp misalignment (diff)
downloadnheko-622fc3f9c38a9226b3de7dcb3c0f5e52927560de.tar.xz
Save and restore app's window size
closes #46
Diffstat (limited to 'include')
-rw-r--r--include/Config.h10
-rw-r--r--include/MainWindow.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/include/Config.h b/include/Config.h

index e33fd959..e12fac85 100644 --- a/include/Config.h +++ b/include/Config.h
@@ -11,6 +11,16 @@ static const int fontSize = 12; static const int emojiSize = 14; static const int headerFontSize = 21; +// Window geometry. +namespace window +{ +static const int height = 600; +static const int width = 1066; + +static const int minHeight = 600; +static const int minWidth = 950; +} + // Button settings. namespace btn { diff --git a/include/MainWindow.h b/include/MainWindow.h
index 9d0a601f..a8a86719 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h
@@ -39,6 +39,7 @@ public: ~MainWindow(); static MainWindow *instance(); + void saveCurrentWindowSize(); protected: void closeEvent(QCloseEvent *event); @@ -63,6 +64,7 @@ private slots: private: bool hasActiveUser(); + void restoreWindowSize(); static MainWindow *instance_;