mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 06:09:09 -04:00
Fixed to update the fonts for MainWindow ListWidget
This commit is contained in:
parent
a5752ec4d3
commit
5005c0303d
3 changed files with 4 additions and 10 deletions
|
@ -1642,6 +1642,8 @@ void MainWindow::settingsChanged()
|
||||||
ui->toolBarAction->setIconSize(QSize(toolSize,toolSize));
|
ui->toolBarAction->setIconSize(QSize(toolSize,toolSize));
|
||||||
int itemSize = Settings->getListItemIconSize();
|
int itemSize = Settings->getListItemIconSize();
|
||||||
ui->listWidget->setIconSize(QSize(itemSize,itemSize));
|
ui->listWidget->setIconSize(QSize(itemSize,itemSize));
|
||||||
|
|
||||||
|
updateFontSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::externalLinkActivated(const QUrl &url)
|
void MainWindow::externalLinkActivated(const QUrl &url)
|
||||||
|
@ -1821,13 +1823,6 @@ void MainWindow::setCompactStatusMode(bool compact)
|
||||||
//opModeStatus: TODO Show only ???
|
//opModeStatus: TODO Show only ???
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::showEvent(QShowEvent *event)
|
|
||||||
{
|
|
||||||
if (!event->spontaneous()) {
|
|
||||||
updateFontSize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::updateFontSize()
|
void MainWindow::updateFontSize()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_DARWIN)
|
#if defined(Q_OS_DARWIN)
|
||||||
|
@ -1841,7 +1836,6 @@ void MainWindow::updateFontSize()
|
||||||
QFontMetricsF fontMetrics(newFont);
|
QFontMetricsF fontMetrics(newFont);
|
||||||
int iconHeight = fontMetrics.height()*1.5;
|
int iconHeight = fontMetrics.height()*1.5;
|
||||||
ui->listWidget->setFont(newFont);
|
ui->listWidget->setFont(newFont);
|
||||||
ui->toolBarPage->setFont(newFont);
|
|
||||||
ui->listWidget->setIconSize(QSize(iconHeight, iconHeight));
|
ui->listWidget->setIconSize(QSize(iconHeight, iconHeight));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,8 +204,6 @@ public:
|
||||||
|
|
||||||
static bool hiddenmode;
|
static bool hiddenmode;
|
||||||
|
|
||||||
virtual void showEvent(QShowEvent *) ;
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void receiveNewArgs(QStringList args);
|
void receiveNewArgs(QStringList args);
|
||||||
void displayErrorMessage(int,int,const QString&) ;
|
void displayErrorMessage(int,int,const QString&) ;
|
||||||
|
|
|
@ -376,4 +376,6 @@ void AppearancePage::updateFontSize()
|
||||||
Settings->beginGroup(QString("File"));
|
Settings->beginGroup(QString("File"));
|
||||||
Settings->setValue("MinimumFontSize", ui.minimumFontSize_SB->value());
|
Settings->setValue("MinimumFontSize", ui.minimumFontSize_SB->value());
|
||||||
Settings->endGroup();
|
Settings->endGroup();
|
||||||
|
|
||||||
|
NotifyQt::getInstance()->notifySettingsChanged();
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue