From a523d654ef8a34a14ecdec26371baf37d4ebb2b3 Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 16 Jan 2024 14:54:04 +0100 Subject: [PATCH] Improved Sharedfiles treesize and font fix for macos --- retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp | 6 +++++- retroshare-gui/src/gui/settings/TransferPage.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp index 74a7d5744..5abe9ab39 100644 --- a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.cpp @@ -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)); } diff --git a/retroshare-gui/src/gui/settings/TransferPage.cpp b/retroshare-gui/src/gui/settings/TransferPage.cpp index 915eaa679..6a0feaf2b 100644 --- a/retroshare-gui/src/gui/settings/TransferPage.cpp +++ b/retroshare-gui/src/gui/settings/TransferPage.cpp @@ -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(); }