Merge "Add setting the ICON size attribute in lineedit to the style plugin"
This commit is contained in:
commit
ae88dea1be
@ -4828,6 +4828,9 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
|
||||
case PM_IconViewIconSize:
|
||||
ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget);
|
||||
break;
|
||||
case PM_LineEditIconSize:
|
||||
ret = proxy()->pixelMetric(PM_SmallIconSize, opt, widget);
|
||||
break;
|
||||
|
||||
case PM_LargeIconSize:
|
||||
ret = int(QStyleHelper::dpiScaled(32, opt));
|
||||
|
@ -3045,6 +3045,9 @@ int QFusionStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, co
|
||||
case PM_ListViewIconSize:
|
||||
val = 24;
|
||||
break;
|
||||
case PM_LineEditIconSize:
|
||||
val = 24;
|
||||
break;
|
||||
case PM_DialogButtonsSeparator:
|
||||
case PM_ScrollBarSliderMin:
|
||||
val = 26;
|
||||
|
@ -1516,6 +1516,9 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
|
||||
\value PM_TitleBarButtonSize The size of buttons on a title bar.
|
||||
This enum value has been introduced in Qt 5.8.
|
||||
|
||||
\value PM_LineEditIconSize The default size for icons in a line edit.
|
||||
This enum value has been introduced in Qt 6.2.
|
||||
|
||||
\value PM_CustomBase Base value for custom pixel metrics. Custom
|
||||
values must be greater than this value.
|
||||
|
||||
|
@ -567,6 +567,8 @@ public:
|
||||
PM_TitleBarButtonIconSize,
|
||||
PM_TitleBarButtonSize,
|
||||
|
||||
PM_LineEditIconSize,
|
||||
|
||||
// do not add any values below/greater than this
|
||||
PM_CustomBase = 0xf0000000
|
||||
};
|
||||
|
@ -495,7 +495,7 @@ QLineEditPrivate::SideWidgetParameters QLineEditPrivate::sideWidgetParameters()
|
||||
{
|
||||
Q_Q(const QLineEdit);
|
||||
SideWidgetParameters result;
|
||||
result.iconSize = q->style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, q);
|
||||
result.iconSize = q->style()->pixelMetric(QStyle::PM_LineEditIconSize, nullptr, q);
|
||||
result.margin = result.iconSize / 4;
|
||||
result.widgetWidth = result.iconSize + 6;
|
||||
result.widgetHeight = result.iconSize + 2;
|
||||
|
Loading…
Reference in New Issue
Block a user