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/widgets/qlineedit_p.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/widgets/qlineedit_p.cpp')
-rw-r--r-- | src/widgets/widgets/qlineedit_p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index 4143b848b5..7526379f3c 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -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; |