代码拉取完成,页面将自动刷新
From 52aa36ffc852efc242b1559df7d97fe7bde71a9d Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Tue, 5 Jul 2022 10:13:41 +0800
Subject: [PATCH]
0001_add-setting-thc-ICON-size-attribute-in-lineedit-to-the-style-plugin
---
src/widgets/styles/qcommonstyle.cpp | 3 +++
src/widgets/styles/qfusionstyle.cpp | 3 +++
src/widgets/styles/qstyle.cpp | 3 +++
src/widgets/styles/qstyle.h | 2 ++
4 files changed, 11 insertions(+)
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 559ad913..bcc6160c 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -4832,6 +4832,9 @@ QT_WARNING_POP
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));
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 46e5b6dd..1cd31c10 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -3052,6 +3052,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;
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index d80dafcc..f8eb505d 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1501,6 +1501,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.
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index 5be1b4b2..8fdee8ca 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -587,6 +587,8 @@ public:
PM_TitleBarButtonIconSize,
PM_TitleBarButtonSize,
+ PM_LineEditIconSize,
+
// do not add any values below/greater than this
PM_CustomBase = 0xf0000000
};
--
2.31.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。