Skip to content

Commit

Permalink
Add and use ControlColors.tableRow1/2
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Oct 10, 2023
1 parent 835e0ab commit 8e95aca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ Item
palette.mid : palette.dark

readonly property color background: palette.active.light
readonly property color tableRow1: palette.active.light
readonly property color tableRow2: palette.active.button
}
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Rectangle
if(root.highlightedProvider(modelColumn, modelRow))
return palette.highlight;

return modelRow % 2 ? palette.window : palette.alternateBase;
return modelRow % 2 ? ControlColors.tableRow1 : ControlColors.tableRow2;
}

color: palette.buttonText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ Item
for(let i = 0; i < Math.ceil(tableView.height / tableView.rowHeight) + 1; i++)
{
let yOffset = (i * tableView.rowHeight);
ctx.fillStyle = i % 2 ? palette.light : palette.midlight;
ctx.fillStyle = i % 2 ? ControlColors.tableRow1 : ControlColors.tableRow2;
ctx.fillRect(0, yOffset, width, tableView.rowHeight);
}
}
Expand Down Expand Up @@ -1190,7 +1190,7 @@ Item
if(model.subSelected)
return palette.highlight;

return model.row % 2 ? palette.light : palette.midlight;
return model.row % 2 ? ControlColors.tableRow1 : ControlColors.tableRow2;
}

// Ripped more or less verbatim from qtquickcontrols/src/controls/Styles/Desktop/TableViewStyle.qml
Expand Down

0 comments on commit 8e95aca

Please sign in to comment.