Fixed to update the fonts for MainWindow ListWidget

This commit is contained in:
defnax 2025-02-11 18:51:20 +01:00
parent a5752ec4d3
commit 5005c0303d
3 changed files with 4 additions and 10 deletions

View File

@ -1642,6 +1642,8 @@ void MainWindow::settingsChanged()
ui->toolBarAction->setIconSize(QSize(toolSize,toolSize));
int itemSize = Settings->getListItemIconSize();
ui->listWidget->setIconSize(QSize(itemSize,itemSize));
updateFontSize();
}
void MainWindow::externalLinkActivated(const QUrl &url)
@ -1821,13 +1823,6 @@ void MainWindow::setCompactStatusMode(bool compact)
//opModeStatus: TODO Show only ???
}
void MainWindow::showEvent(QShowEvent *event)
{
if (!event->spontaneous()) {
updateFontSize();
}
}
void MainWindow::updateFontSize()
{
#if defined(Q_OS_DARWIN)
@ -1841,7 +1836,6 @@ void MainWindow::updateFontSize()
QFontMetricsF fontMetrics(newFont);
int iconHeight = fontMetrics.height()*1.5;
ui->listWidget->setFont(newFont);
ui->toolBarPage->setFont(newFont);
ui->listWidget->setIconSize(QSize(iconHeight, iconHeight));
}
}

View File

@ -204,8 +204,6 @@ public:
static bool hiddenmode;
virtual void showEvent(QShowEvent *) ;
public slots:
void receiveNewArgs(QStringList args);
void displayErrorMessage(int,int,const QString&) ;

View File

@ -376,4 +376,6 @@ void AppearancePage::updateFontSize()
Settings->beginGroup(QString("File"));
Settings->setValue("MinimumFontSize", ui.minimumFontSize_SB->value());
Settings->endGroup();
NotifyQt::getInstance()->notifySettingsChanged();
}