Skip to content

Commit

Permalink
Tweaked margin between group box header and contents
Browse files Browse the repository at this point in the history
93f6fef had left it a little uncomfortable.
  • Loading branch information
bjorn committed Apr 18, 2024
1 parent 4862b51 commit cf21779
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/tiled/tiledproxystyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,14 @@ void TiledProxyStyle::drawPrimitive(PrimitiveElement element,
switch (element) {
case PE_FrameGroupBox:
{
int topMargin = 0;
int topMargin = 3;
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
auto control = qobject_cast<const QGroupBox *>(widget);
if (control && !control->isCheckable() && control->title().isEmpty()) {
// Shrinking the topMargin if Not checkable AND title is empty
topMargin = 3;
} else {
topMargin = qMax(pixelMetric(PM_ExclusiveIndicatorHeight),
option->fontMetrics.height()) + 3;
topMargin += qMax(pixelMetric(PM_ExclusiveIndicatorHeight),
option->fontMetrics.height());
}
#endif
QRect frame = option->rect.adjusted(0, topMargin, -1, -1);
Expand Down

0 comments on commit cf21779

Please sign in to comment.