]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improve calculation of size of preferences panel.
authorvsv <vsv@opencascade.com>
Tue, 14 Apr 2020 15:11:20 +0000 (18:11 +0300)
committervsv <vsv@opencascade.com>
Tue, 14 Apr 2020 15:11:20 +0000 (18:11 +0300)
src/ModuleBase/ModuleBase_Preferences.cpp
src/ModuleBase/ModuleBase_Preferences.h

index 4d5f2a1c50d0f84b5912425809543a06540c30e5..ac5aae4c68dbe9d4808a03446dec50224ba1532b 100644 (file)
@@ -295,7 +295,6 @@ ModuleBase_PreferencesDlg::ModuleBase_PreferencesDlg(SUIT_ResourceMgr* theResurc
   createEditors();
 
   myPreferences->retrieve();
-  setMinimumSize(820, 300);
 }
 
 ModuleBase_PreferencesDlg::~ModuleBase_PreferencesDlg()
@@ -458,6 +457,12 @@ void ModuleBase_PreferencesDlg::onDefault()
   ModuleBase_Preferences::resetConfigPropPreferences(myPreferences);
 }
 
+void ModuleBase_PreferencesDlg::showEvent(QShowEvent* theEvent)
+{
+  QDialog::showEvent(theEvent);
+  adjustSize();
+}
+
 //**********************************************************
 //**********************************************************
 //**********************************************************
index 59badbfacd72280ee0071cd044d37ec68f734083..669599970c88a20f1218ff7d6be871e9bcd80318 100644 (file)
@@ -149,6 +149,9 @@ Q_OBJECT
    /// A slot called on Ok button press
   virtual void accept();
 
+protected:
+  virtual void showEvent(QShowEvent* theEvent);
+
 protected slots:
   /// A slot called on Default button press
   void onDefault();