mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-20 13:19:07 -04:00
Replaced font handling by FontSizeHandler and reenabled deactivated item delegates
This commit is contained in:
parent
93154fddc4
commit
973246624f
31 changed files with 196 additions and 383 deletions
|
@ -93,6 +93,8 @@ SettingsPage::SettingsPage(QWidget *parent)
|
|||
|
||||
connect(ui.listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(setNewPage(int)));
|
||||
connect(this, SIGNAL(finished(int)), this, SLOT(dialogFinished(int)));
|
||||
|
||||
mFontSizeHandler.registerFontSize(ui.listWidget);
|
||||
}
|
||||
|
||||
SettingsPage::~SettingsPage()
|
||||
|
@ -239,25 +241,3 @@ 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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue