Browse Source

Merge pull request #10720 from Chocobo1/arrow

Fix arrow too large on macOS
adaptive-webui-19844
Mike Tzou 6 years ago committed by GitHub
parent
commit
683196f916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/gui/transferlistfilterswidget.cpp

9
src/gui/transferlistfilterswidget.cpp

@ -30,7 +30,6 @@ @@ -30,7 +30,6 @@
#include <QCheckBox>
#include <QDebug>
#include <QGuiApplication>
#include <QIcon>
#include <QListWidgetItem>
#include <QMenu>
@ -80,12 +79,12 @@ namespace @@ -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…
Cancel
Save