diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2018-10-03 14:21:09 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2018-10-06 19:47:44 +0000 |
commit | 05b8ba51550127c85cd2db5cb819b695b56c57ce (patch) | |
tree | 9c9822ca5bf9686f30f29de36457472e8aca8c08 /src/widgets/widgets/qlineedit_p.cpp | |
parent | cd3374c4efb48f3088429c8735610e7c6b61d1af (diff) |
QLineEdit: take the size of actions' icons from a style
The height of a line edit depends on the height of its font,
which in turn depends on DPI. So use the DPI-scaled icon size
from a style instead of hard-coded values.
Task-number: QTBUG-65627
Change-Id: Ic1f5af61b0d6346cfbc828817c4a3a39296a41ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@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 33d542abc0..fce3d47b17 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -441,7 +441,7 @@ QLineEditPrivate::SideWidgetParameters QLineEditPrivate::sideWidgetParameters() { Q_Q(const QLineEdit); SideWidgetParameters result; - result.iconSize = q->height() < 34 ? 16 : 32; + result.iconSize = q->style()->pixelMetric(QStyle::PM_SmallIconSize, 0, q); result.margin = result.iconSize / 4; result.widgetWidth = result.iconSize + 6; result.widgetHeight = result.iconSize + 2; |