diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2014-09-10 18:09:55 +0400 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2014-09-15 10:05:25 +0200 |
commit | 256df2484c62aebb9062dd2559399a136678a430 (patch) | |
tree | 4cce109a6ac65a53b9b981a2339ffd0b8bf5d1d4 /src/widgets/itemviews/qtreeview_p.h | |
parent | 0c748fb7b109244c03eebbceb400db53af95974c (diff) | |
download | qtbase-256df2484c62aebb9062dd2559399a136678a430.tar.gz |
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/itemviews/qtreeview_p.h')
-rw-r--r-- | src/widgets/itemviews/qtreeview_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h index 5d6333e856..c44d6d7ced 100644 --- a/src/widgets/itemviews/qtreeview_p.h +++ b/src/widgets/itemviews/qtreeview_p.h @@ -89,7 +89,7 @@ public: uniformRowHeights(false), rootDecoration(true), itemsExpandable(true), sortingEnabled(false), expandsOnDoubleClick(true), - allColumnsShowFocus(false), current(0), spanning(false), + allColumnsShowFocus(false), customIndent(false), current(0), spanning(false), animationsEnabled(false), columnResizeTimerID(0), autoExpandDelay(-1), hoverBranch(-1), geometryRecursionBlock(false), hasRemovedItems(false), treePosition(0) {} @@ -191,6 +191,7 @@ public: bool sortingEnabled; bool expandsOnDoubleClick; bool allColumnsShowFocus; + bool customIndent; // used for drawing mutable QPair<int,int> leftAndRight; @@ -241,6 +242,8 @@ public: int accessibleTree2Index(const QModelIndex &index) const; + void updateIndentationFromStyle(); + // used for spanning rows QVector<QPersistentModelIndex> spanningIndexes; |