Resize renderer view back on Windows on language selection changes (#6302)

This commit is contained in:
Cacodemon345
2025-10-08 21:19:23 +06:00
committed by GitHub
parent 51a814c959
commit 40ed311895
2 changed files with 17 additions and 0 deletions

View File

@@ -2306,7 +2306,14 @@ MainWindow::changeEvent(QEvent *event)
{
#ifdef Q_OS_WINDOWS
if (event->type() == QEvent::LanguageChange) {
auto size = this->centralWidget()->size();
QApplication::setFont(QFont(ProgSettings::getFontName(lang_id), 9));
QApplication::processEvents();
main_window->centralWidget()->setFixedSize(size);
QApplication::processEvents();
if (vid_resize == 1) {
main_window->centralWidget()->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
}
}
#endif
QWidget::changeEvent(event);