diff options
| author | Peter Penz <[email protected]> | 2012-02-22 18:28:11 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-02-22 18:31:03 +0100 |
| commit | dbc5fd7a491f95ca4084a113d0f902ea975478fd (patch) | |
| tree | f9c43d6008e48189f39bd58cd7f0982a5f177065 /src/kitemviews/kitemlistwidget.h | |
| parent | bdd0fdf2460232fe17b0e54e42fcda4cc18b811a (diff) | |
Fix alternate backgrounds when enabling grouping
Up to now the alternating backgrounds just have been calculated by
checking whether the item index is odd. This does not work well when
grouping is enabled: In this case the alternate background color
of the first item of a group should stay consistent.
Diffstat (limited to 'src/kitemviews/kitemlistwidget.h')
| -rw-r--r-- | src/kitemviews/kitemlistwidget.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kitemviews/kitemlistwidget.h b/src/kitemviews/kitemlistwidget.h index 20efa7c94..84bd15fa5 100644 --- a/src/kitemviews/kitemlistwidget.h +++ b/src/kitemviews/kitemlistwidget.h @@ -82,8 +82,8 @@ public: void setHovered(bool hovered); bool isHovered() const; - void setAlternatingBackgroundColors(bool enable); - bool alternatingBackgroundColors() const; + void setAlternateBackground(bool enable); + bool alternateBackground() const; void setEnabledSelectionToggle(bool enabled); bool enabledSelectionToggle() const; @@ -138,7 +138,7 @@ protected: virtual void currentChanged(bool current); virtual void selectedChanged(bool selected); virtual void hoveredChanged(bool hovered); - virtual void alternatingBackgroundColorsChanged(bool enabled); + virtual void alternateBackgroundChanged(bool enabled); virtual void siblingsInformationChanged(const QBitArray& current, const QBitArray& previous); virtual void resizeEvent(QGraphicsSceneResizeEvent* event); @@ -164,7 +164,7 @@ private: bool m_selected; bool m_current; bool m_hovered; - bool m_alternatingBackgroundColors; + bool m_alternateBackground; bool m_enabledSelectionToggle; QHash<QByteArray, QVariant> m_data; QList<QByteArray> m_visibleRoles; |
