From 2da580066525f18bcd1af056b2d49f2650497893 Mon Sep 17 00:00:00 2001 From: thalieht Date: Tue, 8 Aug 2017 23:43:23 +0300 Subject: [PATCH] Remove indentation for category/tag filter widgets in all platforms --- src/gui/categoryfilterwidget.cpp | 5 ++--- src/gui/categoryfilterwidget.h | 2 -- src/gui/tagfilterwidget.cpp | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/categoryfilterwidget.cpp b/src/gui/categoryfilterwidget.cpp index 5422388b6..98437de7f 100644 --- a/src/gui/categoryfilterwidget.cpp +++ b/src/gui/categoryfilterwidget.cpp @@ -73,10 +73,10 @@ CategoryFilterWidget::CategoryFilterWidget(QWidget *parent) setIconSize(Utils::Misc::smallIconSize()); #ifdef Q_OS_MAC setAttribute(Qt::WA_MacShowFocusRect, false); +#endif m_defaultIndentation = indentation(); if (!BitTorrent::Session::instance()->isSubcategoriesEnabled()) setIndentation(0); -#endif setContextMenuPolicy(Qt::CustomContextMenu); sortByColumn(0, Qt::AscendingOrder); setCurrentIndex(model()->index(0, 0)); @@ -157,12 +157,11 @@ void CategoryFilterWidget::showMenu(QPoint) void CategoryFilterWidget::callUpdateGeometry() { -#ifdef Q_OS_MAC if (!BitTorrent::Session::instance()->isSubcategoriesEnabled()) setIndentation(0); else setIndentation(m_defaultIndentation); -#endif + updateGeometry(); } diff --git a/src/gui/categoryfilterwidget.h b/src/gui/categoryfilterwidget.h index 9c6df0e59..528a3c827 100644 --- a/src/gui/categoryfilterwidget.h +++ b/src/gui/categoryfilterwidget.h @@ -58,7 +58,5 @@ private: void rowsInserted(const QModelIndex &parent, int start, int end) override; QString askCategoryName(); -#ifdef Q_OS_MAC int m_defaultIndentation; -#endif }; diff --git a/src/gui/tagfilterwidget.cpp b/src/gui/tagfilterwidget.cpp index 591d8b427..7fce3321f 100644 --- a/src/gui/tagfilterwidget.cpp +++ b/src/gui/tagfilterwidget.cpp @@ -73,8 +73,8 @@ TagFilterWidget::TagFilterWidget(QWidget *parent) setIconSize(Utils::Misc::smallIconSize()); #if defined(Q_OS_MAC) setAttribute(Qt::WA_MacShowFocusRect, false); - setIndentation(0); #endif + setIndentation(0); setContextMenuPolicy(Qt::CustomContextMenu); sortByColumn(0, Qt::AscendingOrder); setCurrentIndex(model()->index(0, 0));