From 6b73eb58bccc0efbd411740a4bd17dcec927e13d Mon Sep 17 00:00:00 2001 From: Rinaldus Date: Tue, 10 Oct 2017 13:47:26 +0300 Subject: [PATCH] Details window now remembers its size --- mail-notifier.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mail-notifier.py b/mail-notifier.py index 08669d9..c7e7295 100755 --- a/mail-notifier.py +++ b/mail-notifier.py @@ -269,9 +269,15 @@ class Details(QDialog): self.ui.setupUi(self) self.setWindowFlags(QtCore.Qt.Window) self.ui.btnRefresh.clicked.connect(self.Refresh_clicked) + if (settings.contains("Details_width") and settings.contains("Details_height")): + width = int(settings.value("Details_width")) + height = int(settings.value("Details_height")) + self.resize(width,height) def closeEvent(self, event): event.ignore() + settings.setValue("Details_width",self.width()) + settings.setValue("Details_height",self.height()) self.hide() def Refresh_clicked(self):