mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
Merge pull request #2831 from defnax/downloadupload-treefixes
Improved Sharedfiles treesize and font fix for macos
This commit is contained in:
commit
8564a22bef
@ -1688,12 +1688,16 @@ bool SharedFilesDialog::tree_FilterItem(const QModelIndex &index, const QString
|
||||
|
||||
void SharedFilesDialog::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.dirTreeView->font();
|
||||
if (newFont.pointSize() != customFontSize) {
|
||||
newFont.setPointSize(customFontSize);
|
||||
QFontMetricsF fontMetrics(newFont);
|
||||
int iconHeight = fontMetrics.height();
|
||||
int iconHeight = fontMetrics.height()*1.5;
|
||||
ui.dirTreeView->setFont(newFont);
|
||||
ui.dirTreeView->setIconSize(QSize(iconHeight, iconHeight));
|
||||
}
|
||||
|
@ -204,7 +204,11 @@ void TransferPage::load()
|
||||
whileBlocking(ui.suffixesIgnoreList_LE)->setText( ignore_suffixes_string );
|
||||
|
||||
Settings->beginGroup(QString("File"));
|
||||
#if defined(Q_OS_DARWIN)
|
||||
whileBlocking(ui.minimumFontSize_SB)->setValue( Settings->value("MinimumFontSize", 13 ).toInt());
|
||||
#else
|
||||
whileBlocking(ui.minimumFontSize_SB)->setValue( Settings->value("MinimumFontSize", 11 ).toInt());
|
||||
#endif
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user