diff options
author | Tang Haixiang <tanghaixiang@uniontech.com> | 2021-03-08 19:49:44 +0800 |
---|---|---|
committer | Tang Haixiang <tanghaixiang@uniontech.com> | 2021-03-12 08:39:04 +0800 |
commit | 24226bb5f595581a239356c18a338783a85349ca (patch) | |
tree | 1f27498d130fc69f8c98c0a911259bbb9c4d824c /src/widgets/styles/qcommonstyle.cpp | |
parent | 674747bac1c8b57d4940de2ee68b6b562dfcad61 (diff) |
Add setting the ICON size attribute in lineedit to the style plugin
When the font is large enough, using PM_SmallIconSize will get a large
lineedit,but the icon is very small. This is very unsightly, and the
style plug-in hopes to be able to define the size of the icon by itself.
Change-Id: I0e35b331301472541d3378e748dbcd074d5419a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index a2f52562c8..358edc230b 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -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)); |