From: vsv Date: Tue, 14 Apr 2020 15:11:20 +0000 (+0300) Subject: Improve calculation of size of preferences panel. X-Git-Tag: V9_5_0b1~49 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=814a346c0ef4b2625779c5ef96be5ff87980acbb;p=modules%2Fshaper.git Improve calculation of size of preferences panel. --- diff --git a/src/ModuleBase/ModuleBase_Preferences.cpp b/src/ModuleBase/ModuleBase_Preferences.cpp index 4d5f2a1c5..ac5aae4c6 100644 --- a/src/ModuleBase/ModuleBase_Preferences.cpp +++ b/src/ModuleBase/ModuleBase_Preferences.cpp @@ -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(); +} + //********************************************************** //********************************************************** //********************************************************** diff --git a/src/ModuleBase/ModuleBase_Preferences.h b/src/ModuleBase/ModuleBase_Preferences.h index 59badbfac..669599970 100644 --- a/src/ModuleBase/ModuleBase_Preferences.h +++ b/src/ModuleBase/ModuleBase_Preferences.h @@ -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();