Fix windows 9x and possibly other styles

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2025-03-19 13:32:14 +00:00
parent a108b5e9eb
commit 947ca67952
No known key found for this signature in database
GPG Key ID: 5E39D70B4C93C38E

View File

@ -172,6 +172,8 @@ QStyleOptionViewItem ProjectItemDelegate::makeCheckboxStyleOption(const QStyleOp
if (checkboxOpt.checkState == Qt::Checked)
checkboxOpt.state |= QStyle::State_On;
else
checkboxOpt.state |= QStyle::State_Off;
QRect checkboxRect = style->subElementRect(QStyle::SE_ItemViewItemCheckIndicator, &checkboxOpt, opt.widget);
// 5px is the typical top margin for image