Improve default Qt widget icons
* Include new icons for toolbar overflow to ensure they are tinted correctly and fit in with the rest of the UI. * Replace custom code for clearing line edits by including a proper icon for the default action.
This commit is contained in:
@@ -54,6 +54,8 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "core/Resources.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_GUI_EXPORT int qt_defaultDpiX();
|
||||
QT_END_NAMESPACE
|
||||
@@ -3036,6 +3038,21 @@ QPalette BaseStyle::standardPalette() const
|
||||
return QCommonStyle::standardPalette();
|
||||
}
|
||||
|
||||
QIcon BaseStyle::standardIcon(StandardPixmap sp, const QStyleOption* opt, const QWidget* widget) const
|
||||
{
|
||||
switch (sp) {
|
||||
case SP_ToolBarHorizontalExtensionButton:
|
||||
return resources()->icon("chevron-double-down");
|
||||
case SP_ToolBarVerticalExtensionButton:
|
||||
return resources()->icon("chevron-double-right");
|
||||
case SP_LineEditClearButton:
|
||||
return resources()->icon(
|
||||
QString("edit-clear-locationbar-").append((opt->direction == Qt::LeftToRight) ? "rtl" : "ltr"));
|
||||
default:
|
||||
return QCommonStyle::standardIcon(sp, opt, widget);
|
||||
}
|
||||
}
|
||||
|
||||
void BaseStyle::drawComplexControl(ComplexControl control,
|
||||
const QStyleOptionComplex* option,
|
||||
QPainter* painter,
|
||||
|
||||
Reference in New Issue
Block a user