@@ -1937,7 +1937,7 @@ void QHaikuStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
1937
1937
1938
1938
QRect rect = option->rect .adjusted (0 , 0 , 0 , 0 );
1939
1939
BRect bRect (0 .0f , 0 .0f , rect.width () - 1 , rect.height () - 1 );
1940
- QRect editRect = proxy ()->subControlRect (CC_SpinBox, spinBox, SC_SpinBoxEditField, widget);
1940
+ QRect editRect = proxy ()->subControlRect (CC_SpinBox, spinBox, SC_SpinBoxEditField, widget). adjusted (- 2 ,- 2 , 2 , 2 ) ;
1941
1941
QRect upRect = proxy ()->subControlRect (CC_SpinBox, spinBox, SC_SpinBoxUp, widget);
1942
1942
QRect downRect = proxy ()->subControlRect (CC_SpinBox, spinBox, SC_SpinBoxDown, widget);
1943
1943
BRect bEditRect (editRect.left (), editRect.top (), editRect.right (), editRect.bottom ());
@@ -1954,7 +1954,6 @@ void QHaikuStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
1954
1954
flags |= BControlLook::B_FOCUSED;
1955
1955
1956
1956
TemporarySurface surface (bRect);
1957
- bEditRect.InsetBy (-2 , -2 );
1958
1957
surface.view ()->SetViewColor (bgColor);
1959
1958
surface.view ()->SetLowColor (bgColor);
1960
1959
surface.view ()->SetHighColor (bgColor);
@@ -2609,7 +2608,7 @@ int QHaikuStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, con
2609
2608
ret = 5 ;
2610
2609
break ;
2611
2610
case PM_SpinBoxFrameWidth:
2612
- ret = 6 ;
2611
+ ret = 2 ;
2613
2612
break ;
2614
2613
case PM_MenuBarItemSpacing:
2615
2614
ret = 0 ;
@@ -2731,6 +2730,7 @@ QSize QHaikuStyle::sizeFromContents(ContentsType type, const QStyleOption *optio
2731
2730
}
2732
2731
break ;
2733
2732
case CT_SpinBox:
2733
+ newSize += QSize (0 , 3 );
2734
2734
break ;
2735
2735
case CT_ComboBox:
2736
2736
newSize = sizeFromContents (CT_PushButton, option, size, widget);
@@ -3103,25 +3103,25 @@ QRect QHaikuStyle::subControlRect(ComplexControl control, const QStyleOptionComp
3103
3103
if (option->rect .height ()-(frameWidth*2 ) < 16 )
3104
3104
frameWidth = -(16 - option->rect .height ()) / 2 ;
3105
3105
int space = 3 ;
3106
- QRect frame = spinbox->rect .adjusted (1 , frameWidth, - 1 , -frameWidth);
3106
+ QRect frame = spinbox->rect .adjusted (0 , frameWidth, 0 , -frameWidth);
3107
3107
QSize buttonSize = QSize (frame.height () * 0.7 , frame.height () + 4 );
3108
3108
3109
3109
switch (subControl) {
3110
3110
case SC_SpinBoxUp:
3111
3111
if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons)
3112
3112
return QRect ();
3113
- rect = QRect (spinbox->rect .right () - buttonSize.width (), frame.top () - 2 , buttonSize.width (), buttonSize.height ());
3113
+ rect = QRect (spinbox->rect .right () - buttonSize.width (), frame.top () - 3 , buttonSize.width () + 2 , buttonSize.height () + 2 );
3114
3114
break ;
3115
3115
case SC_SpinBoxDown:
3116
3116
if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons)
3117
3117
return QRect ();
3118
- rect = QRect (spinbox->rect .right () - buttonSize.width () * 2 , frame.top () - 2 , buttonSize.width (), buttonSize.height ());
3118
+ rect = QRect (( spinbox->rect .right () - buttonSize.width () * 2 ) - 1 , frame.top () - 3 , buttonSize.width () + 1 , buttonSize.height () + 2 );
3119
3119
break ;
3120
3120
case SC_SpinBoxEditField:
3121
3121
if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) {
3122
- rect = frame;
3122
+ rect = frame. adjusted ( 1 , 1 ,- 1 ,- 1 ) ;
3123
3123
} else {
3124
- rect = QRect (frame.left (), frame.top (), spinbox->rect .width () - buttonSize.width () * 2 - space, frame.height () );
3124
+ rect = QRect (frame.left ()+ 1 , frame.top ()- 1 , ( spinbox->rect .width () - buttonSize.width () * 2 - space) - 1 , frame.bottom () + 1 );
3125
3125
}
3126
3126
break ;
3127
3127
case SC_SpinBoxFrame:
0 commit comments