mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
Improved Sharedfiles treesize and font fix for macos
This commit is contained in:
parent
3063e74e59
commit
a523d654ef
@ -1688,12 +1688,16 @@ bool SharedFilesDialog::tree_FilterItem(const QModelIndex &index, const QString
|
|||||||
|
|
||||||
void SharedFilesDialog::updateFontSize()
|
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();
|
int customFontSize = Settings->valueFromGroup("File", "MinimumFontSize", 11).toInt();
|
||||||
|
#endif
|
||||||
QFont newFont = ui.dirTreeView->font();
|
QFont newFont = ui.dirTreeView->font();
|
||||||
if (newFont.pointSize() != customFontSize) {
|
if (newFont.pointSize() != customFontSize) {
|
||||||
newFont.setPointSize(customFontSize);
|
newFont.setPointSize(customFontSize);
|
||||||
QFontMetricsF fontMetrics(newFont);
|
QFontMetricsF fontMetrics(newFont);
|
||||||
int iconHeight = fontMetrics.height();
|
int iconHeight = fontMetrics.height()*1.5;
|
||||||
ui.dirTreeView->setFont(newFont);
|
ui.dirTreeView->setFont(newFont);
|
||||||
ui.dirTreeView->setIconSize(QSize(iconHeight, iconHeight));
|
ui.dirTreeView->setIconSize(QSize(iconHeight, iconHeight));
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,11 @@ void TransferPage::load()
|
|||||||
whileBlocking(ui.suffixesIgnoreList_LE)->setText( ignore_suffixes_string );
|
whileBlocking(ui.suffixesIgnoreList_LE)->setText( ignore_suffixes_string );
|
||||||
|
|
||||||
Settings->beginGroup(QString("File"));
|
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());
|
whileBlocking(ui.minimumFontSize_SB)->setValue( Settings->value("MinimumFontSize", 11 ).toInt());
|
||||||
|
#endif
|
||||||
Settings->endGroup();
|
Settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user