From 631b9b5f7a09fa45595b517e87c1bbfbc70dda8b Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 1 Feb 2022 20:01:38 +0100 Subject: [PATCH] Fix default font metrics for forums tree --- retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp | 4 ++++ retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index fb962ca5c..19c408336 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -321,6 +321,10 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget float f = QFontMetricsF(font()).height()/14.0f ; + QFontMetricsF fontMetrics(ui->threadTreeWidget->font()); + int iconHeight = fontMetrics.height() * 1.4; + ui->threadTreeWidget->setIconSize(QSize(iconHeight, iconHeight)); + /* Set header resize modes and initial section sizes */ QHeaderView * ttheader = ui->threadTreeWidget->header () ; diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui index b27354e8b..c74ea5ebb 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui @@ -233,6 +233,11 @@ + + + 10 + + Qt::CustomContextMenu