Skip to content

Commit dfd99bb

Browse files
committed
Fix buttonless spinbox size
1 parent 3f1745c commit dfd99bb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

styles/qthaikustyle/haiku/qhaikustyle.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -2076,6 +2076,12 @@ void QHaikuStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
20762076
be_control_look->DrawTextControlBorder(surface.view(), bEditRect, bEditRect, bgColor, flags);
20772077
}
20782078

2079+
if (spinBox->buttonSymbols == QAbstractSpinBox::NoButtons) {
2080+
painter->drawImage(rect, surface.image());
2081+
painter->restore();
2082+
break;
2083+
}
2084+
20792085
float frameTint = B_DARKEN_1_TINT;
20802086
float fgTintUp, bgTintUp;
20812087
float fgTintDown, bgTintDown;
@@ -3239,7 +3245,7 @@ QRect QHaikuStyle::subControlRect(ComplexControl control, const QStyleOptionComp
32393245
break;
32403246
case SC_SpinBoxEditField:
32413247
if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) {
3242-
rect = frame.adjusted(1,1,-1,-1);
3248+
rect = frame.adjusted(0,-2, 0, 2);
32433249
} else {
32443250
rect = QRect(frame.left(), frame.top() - 2, (spinbox->rect.width() - buttonSize.width() * 2 - space) - 1, buttonSize.height());
32453251
}

0 commit comments

Comments
 (0)