mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Fix arrow too large on macOS
By changing to use natvie UI tree controls. Closes #10709.
This commit is contained in:
parent
c5430030e3
commit
0d9fcb0c1d
1 changed files with 4 additions and 5 deletions
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include <QCheckBox>
|
||||
#include <QDebug>
|
||||
#include <QGuiApplication>
|
||||
#include <QIcon>
|
||||
#include <QListWidgetItem>
|
||||
#include <QMenu>
|
||||
|
@ -80,12 +79,12 @@ namespace
|
|||
{
|
||||
QPainter painter(this);
|
||||
|
||||
QStyleOption indicatorOption;
|
||||
QStyleOptionViewItem indicatorOption;
|
||||
indicatorOption.initFrom(this);
|
||||
indicatorOption.rect = style()->subElementRect(QStyle::SE_CheckBoxIndicator, &indicatorOption, this);
|
||||
style()->drawPrimitive((isChecked() ? QStyle::PE_IndicatorArrowDown
|
||||
: (QGuiApplication::isLeftToRight() ? QStyle::PE_IndicatorArrowRight : QStyle::PE_IndicatorArrowLeft))
|
||||
, &indicatorOption, &painter, this);
|
||||
indicatorOption.state |= (QStyle::State_Children
|
||||
| (isChecked() ? QStyle::State_Open : QStyle::State_None));
|
||||
style()->drawPrimitive(QStyle::PE_IndicatorBranch, &indicatorOption, &painter, this);
|
||||
|
||||
QStyleOptionButton labelOption;
|
||||
initStyleOption(&labelOption);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue