Center all QAbstractSpinBox, not just integer QSpinBox

Fixes misaligned QDoubleSpinBox, and aligns QDateTimeEdit (which may be
a good thing as well).

Fixes #12.
wilder-5.24
Nyan Pasu 5 years ago
parent b792ea06cf
commit d59275df3b
  1. 4
      kstyle/breezestyle.cpp

@ -22,6 +22,7 @@
#include <KColorUtils>
#include <KIconLoader>
#include <QAbstractSpinBox>
#include <QApplication>
#include <QBitmap>
#include <QCheckBox>
@ -40,7 +41,6 @@
#include <QRadioButton>
#include <QScrollBar>
#include <QItemDelegate>
#include <QSpinBox>
#include <QSplitterHandle>
#include <QTextEdit>
#include <QToolBar>
@ -419,7 +419,7 @@ namespace Breeze
widget->setAttribute(Qt::WA_StyledBackground);
} else if ( auto btn = qobject_cast<QPushButton*> (widget) ) {
btn->setAutoDefault(false);
} else if ( auto spbx = qobject_cast<QSpinBox*> (widget) ) {
} else if ( auto spbx = qobject_cast<QAbstractSpinBox*> (widget) ) {
spbx->setAlignment(Qt::AlignCenter);
}

Loading…
Cancel
Save