mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-04-14 04:23:10 -04:00
Added for settings list fonts settings
This commit is contained in:
parent
7399c42dfb
commit
b168110a58
@ -239,3 +239,25 @@ void SettingsPage::notifySettingsChanged()
|
||||
if (NotifyQt::getInstance())
|
||||
NotifyQt::getInstance()->notifySettingsChanged();
|
||||
}
|
||||
|
||||
void SettingsPage::showEvent(QShowEvent *event)
|
||||
{
|
||||
if (!event->spontaneous()) {
|
||||
updateFontSize();
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsPage::updateFontSize()
|
||||
{
|
||||
#if defined(Q_OS_DARWIN)
|
||||
int customFontSize = Settings->valueFromGroup("File", "MinimumFontSize", 13).toInt();
|
||||
#else
|
||||
int customFontSize = Settings->valueFromGroup("File", "MinimumFontSize", 11).toInt();
|
||||
#endif
|
||||
QFont newFont = ui.listWidget->font();
|
||||
if (newFont.pointSize() != customFontSize) {
|
||||
newFont.setPointSize(customFontSize);
|
||||
QFontMetricsF fontMetrics(newFont);
|
||||
ui.listWidget->setFont(newFont);
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ protected:
|
||||
~SettingsPage();
|
||||
|
||||
void addPage(ConfigPage*) ;
|
||||
virtual void showEvent(QShowEvent *) override;
|
||||
|
||||
public slots:
|
||||
//! Go to a specific part of the control panel.
|
||||
@ -67,6 +68,7 @@ private slots:
|
||||
|
||||
private:
|
||||
void initStackedWidget();
|
||||
void updateFontSize();
|
||||
|
||||
private:
|
||||
FloatingHelpBrowser *mHelpBrowser;
|
||||
|
Loading…
x
Reference in New Issue
Block a user