Gui: check dialog width after language change
This commit is contained in:
@@ -759,6 +759,14 @@ void DlgPreferencesImp::showEvent(QShowEvent* ev)
|
||||
move(x(), heightDifference / 2);
|
||||
}
|
||||
|
||||
expandToMinimumDialogWidth();
|
||||
}
|
||||
|
||||
void DlgPreferencesImp::expandToMinimumDialogWidth()
|
||||
{
|
||||
auto screen = windowHandle()->screen();
|
||||
auto availableSize = screen->availableSize();
|
||||
|
||||
// if the expanded dialog occupies less than 50% of the screen
|
||||
int mw = minimumDialogWidth(minimumPageWidth());
|
||||
if (availableSize.width() > 2 * mw) {
|
||||
@@ -878,8 +886,10 @@ void DlgPreferencesImp::changeEvent(QEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
expandToMinimumDialogWidth();
|
||||
updatePageDependentWidgets();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,6 +185,7 @@ private:
|
||||
void addSizeHint(QWidget*);
|
||||
int minimumPageWidth() const;
|
||||
int minimumDialogWidth(int) const;
|
||||
void expandToMinimumDialogWidth();
|
||||
//@}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user