aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2/macos/TreeViewDelegate.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols2/macos/TreeViewDelegate.qml')
-rw-r--r--src/quickcontrols2/macos/TreeViewDelegate.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quickcontrols2/macos/TreeViewDelegate.qml b/src/quickcontrols2/macos/TreeViewDelegate.qml
index 862ff6c440..adc1ee8528 100644
--- a/src/quickcontrols2/macos/TreeViewDelegate.qml
+++ b/src/quickcontrols2/macos/TreeViewDelegate.qml
@@ -49,7 +49,9 @@ NativeStyle.DefaultTreeViewDelegate {
background: Rectangle {
color: control.row === control.treeView.currentRow
? control.palette.highlight
- : (control.row % 2 === 0 ? control.palette.base : control.palette.alternateBase)
+ : (control.treeView.alternatingRows && control.row % 2 !== 0
+ ? control.palette.alternateBase
+ : control.palette.base)
// Ideally we want a rounded background for the whole row, also when
// there are more than one column. But until Rectangle gains support
// for corners with individual radii, we simplify it (QTBUG-48774)