mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 19:26:59 +03:00
Merge pull request #7234 from thalieht/indentation
Remove indentation for category/tag filter widgets in all platforms
This commit is contained in:
commit
593c24e5bd
3 changed files with 3 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue