mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Merge pull request #10720 from Chocobo1/arrow
Fix arrow too large on macOS
This commit is contained in:
commit
683196f916
1 changed files with 4 additions and 5 deletions
|
@ -30,7 +30,6 @@
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QGuiApplication>
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
@ -80,12 +79,12 @@ namespace
|
||||||
{
|
{
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
|
|
||||||
QStyleOption indicatorOption;
|
QStyleOptionViewItem indicatorOption;
|
||||||
indicatorOption.initFrom(this);
|
indicatorOption.initFrom(this);
|
||||||
indicatorOption.rect = style()->subElementRect(QStyle::SE_CheckBoxIndicator, &indicatorOption, this);
|
indicatorOption.rect = style()->subElementRect(QStyle::SE_CheckBoxIndicator, &indicatorOption, this);
|
||||||
style()->drawPrimitive((isChecked() ? QStyle::PE_IndicatorArrowDown
|
indicatorOption.state |= (QStyle::State_Children
|
||||||
: (QGuiApplication::isLeftToRight() ? QStyle::PE_IndicatorArrowRight : QStyle::PE_IndicatorArrowLeft))
|
| (isChecked() ? QStyle::State_Open : QStyle::State_None));
|
||||||
, &indicatorOption, &painter, this);
|
style()->drawPrimitive(QStyle::PE_IndicatorBranch, &indicatorOption, &painter, this);
|
||||||
|
|
||||||
QStyleOptionButton labelOption;
|
QStyleOptionButton labelOption;
|
||||||
initStyleOption(&labelOption);
|
initStyleOption(&labelOption);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue