summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qcommonstyle.cpp
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2014-09-10 18:09:55 +0400
committerAlexander Volkov <a.volkov@rusbitech.ru>2014-09-15 10:05:25 +0200
commit256df2484c62aebb9062dd2559399a136678a430 (patch)
tree4cce109a6ac65a53b9b981a2339ffd0b8bf5d1d4 /src/widgets/styles/qcommonstyle.cpp
parent0c748fb7b109244c03eebbceb400db53af95974c (diff)
Make the default value of QTreeView::indentation() be style dependent
Add a new PM_TreeViewIndentaion enum value to QStyle and get the corresponding pixel metric in QTreeView. [ChangeLog][QtWidgets][QTreeView] Indentation is now style-dependent by default. [ChangeLog][QtWidgets][QTreeView] Added resetIndentation(). Change-Id: Ifad7987b8f3c6cd32987b89d95390f33043d8f19 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Adam Majer <adamm@zombino.com>
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index ce6d3d708f..ec289e896b 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -4695,6 +4695,9 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
case PM_SubMenuOverlap:
ret = -proxy()->pixelMetric(QStyle::PM_MenuPanelWidth, opt, widget);
break;
+ case PM_TreeViewIndentation:
+ ret = int(QStyleHelper::dpiScaled(20.));
+ break;
default:
ret = 0;
break;