diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/styles/motif/qcdestyle.cpp | 1 | ||||
-rw-r--r-- | src/plugins/styles/motif/qmotifstyle.cpp | 11 | ||||
-rw-r--r-- | src/plugins/styles/motif/qmotifstyle.h | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/styles/motif/qcdestyle.cpp b/src/plugins/styles/motif/qcdestyle.cpp index 2c34510..756f9f8 100644 --- a/src/plugins/styles/motif/qcdestyle.cpp +++ b/src/plugins/styles/motif/qcdestyle.cpp @@ -100,6 +100,7 @@ QT_BEGIN_NAMESPACE QCDEStyle::QCDEStyle(bool useHighlightCols) : QMotifStyle(useHighlightCols) { + spinboxHCoeff = 10; } /*! diff --git a/src/plugins/styles/motif/qmotifstyle.cpp b/src/plugins/styles/motif/qmotifstyle.cpp index 00bbbc7..7bc340d 100644 --- a/src/plugins/styles/motif/qmotifstyle.cpp +++ b/src/plugins/styles/motif/qmotifstyle.cpp @@ -111,7 +111,8 @@ static const int motifCheckMarkSpace = 16; text color. */ QMotifStyle::QMotifStyle(bool useHighlightCols) : QCommonStyle(), focus(0), - highlightCols(useHighlightCols), animationFps(25), animateTimer(0), animateStep(0) + highlightCols(useHighlightCols), animationFps(25), animateTimer(0), animateStep(0), + spinboxHCoeff(6) { startTime.start(); } @@ -1902,6 +1903,14 @@ QMotifStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, } break; +#ifndef QT_NO_SPINBOX + case CT_SpinBox: + if (const QStyleOptionSpinBox *vopt = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) { + if (vopt->frame) + sz.rheight() += spinboxHCoeff * proxy()->pixelMetric(PM_SpinBoxFrameWidth, vopt, widget); + } + break; +#endif default: sz = QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget); diff --git a/src/plugins/styles/motif/qmotifstyle.h b/src/plugins/styles/motif/qmotifstyle.h index a19d015..4efabe0 100644 --- a/src/plugins/styles/motif/qmotifstyle.h +++ b/src/plugins/styles/motif/qmotifstyle.h @@ -114,6 +114,9 @@ private: int animateTimer; QTime startTime; int animateStep; + +protected: + int spinboxHCoeff; }; QT_END_NAMESPACE |