Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGroupBox with checkbox margin #18

Open
JulienMaille opened this issue Nov 7, 2020 · 0 comments · May be fixed by #19
Open

QGroupBox with checkbox margin #18

JulienMaille opened this issue Nov 7, 2020 · 0 comments · May be fixed by #19

Comments

@JulienMaille
Copy link

if (groupBox->subControls & (SC_GroupBoxLabel | SC_GroupBoxCheckBox)) {
int fontHeight = option->fontMetrics.height();
int topMargin =
qMax(pixelMetric(PM_ExclusiveIndicatorHeight), fontHeight);
topMargin +=
(int)((qreal)fontHeight * Ph::GroupBox_LabelBottomMarginFontRatio);
r.setTop(r.top() + topMargin);
}

According to the doc QStyle::PM_ExclusiveIndicatorHeight 40 is Height of a radio button indicator.
Shouldn't you use QStyle::PM_IndicatorHeight 38: Height of a checkbox indicator.

JulienMaille added a commit to JulienMaille/phantomstyle that referenced this issue Nov 7, 2020
@JulienMaille JulienMaille linked a pull request Nov 7, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant