aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/GeneralDialog.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2023-07-14 14:28:47 +0000
committerSaturneric <[email protected]>2023-07-14 14:28:47 +0000
commitd5b2b3f5d31d1ff2d013d0df4cf8fe138c94d315 (patch)
tree1ebd3944775d60594a0031a598c8a6992920f75a /src/ui/dialog/GeneralDialog.h
parentfix: reduce debug log of core (diff)
downloadGpgFrontend-d5b2b3f5d31d1ff2d013d0df4cf8fe138c94d315.tar.gz
GpgFrontend-d5b2b3f5d31d1ff2d013d0df4cf8fe138c94d315.zip
fix: slove position and size resotre issues
Diffstat (limited to '')
-rw-r--r--src/ui/dialog/GeneralDialog.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/ui/dialog/GeneralDialog.h b/src/ui/dialog/GeneralDialog.h
index 41018105..1e265a8e 100644
--- a/src/ui/dialog/GeneralDialog.h
+++ b/src/ui/dialog/GeneralDialog.h
@@ -57,6 +57,18 @@ class GeneralDialog : public QDialog {
*/
void movePosition2CenterOfParent();
+ /**
+ * @brief
+ *
+ */
+ [[nodiscard]] bool isRectRestored();
+
+ /**
+ * @brief
+ *
+ */
+ void showEvent(QShowEvent* event) override;
+
private slots:
/**
*
@@ -69,11 +81,15 @@ class GeneralDialog : public QDialog {
void slot_save_settings() noexcept;
private:
+ /**
+ *
+ */
+ void update_rect_cache();
+
std::string name_; ///<
- QPoint pos_; ///<
- QSize size_; ///<
- QPoint parent_pos_;
- QSize parent_size_;
+ QRect rect_;
+ QRect parent_rect_;
+ bool rect_restored_ = false;
};
} // namespace GpgFrontend::UI