forked from qt-creator/qt-creator
Apply ManhattanStyle to QSpinBox on a toolbar
Up/Down arrows are not property styled. Change-Id: I4bc633ec18e31d167f93f80fc241a20d0a7e2958 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -47,6 +47,7 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QPainterPath>
|
#include <QPainterPath>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
#include <QSpinBox>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
@@ -302,6 +303,10 @@ void ManhattanStyle::polish(QWidget *widget)
|
|||||||
widget->setPalette(palette);
|
widget->setPalette(palette);
|
||||||
widget->setMaximumHeight(height - 2);
|
widget->setMaximumHeight(height - 2);
|
||||||
widget->setAttribute(Qt::WA_Hover);
|
widget->setAttribute(Qt::WA_Hover);
|
||||||
|
} else if (qobject_cast<QSpinBox*>(widget)) {
|
||||||
|
const bool isLightColored = lightColored(widget);
|
||||||
|
QPalette palette = panelPalette(widget->palette(), isLightColored);
|
||||||
|
widget->setPalette(palette);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user