Skip to content

Commit

Permalink
limit default hotcue palette to 8 colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Be-ing committed Mar 25, 2020
1 parent 7b15170 commit 84a43ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/util/color/colorpalette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ mixxx::RgbColor ColorPalette::previousColor(mixxx::RgbColor color) const {
mixxx::RgbColor ColorPalette::colorForHotcueIndex(unsigned int hotcueIndex) const {
int colorIndex;
if (m_hotcueColorIndices.isEmpty()) {
// For hotcue n, get nth color from palette
// But use only 8 to avoid odd apearances on Hercules P32 or similar
colorIndex = hotcueIndex % 8;
colorIndex = hotcueIndex;
} else {
// For hotcue n, get nth color from palette
colorIndex = m_hotcueColorIndices.at(hotcueIndex % m_hotcueColorIndices.size());
}
return at(colorIndex % size());
Expand Down
6 changes: 5 additions & 1 deletion src/util/color/predefinedcolorpalettes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ const ColorPalette PredefinedColorPalettes::kMixxxHotcueColorPalette =
kColorMixxxPink,
kColorMixxxWhite,
kSchemaMigrationReplacementColor,
});
},
// Exclude kSchemaMigrationReplacementColor from the colors assigned to hotcues
// If there were 9 colors assigned to hotcues, that would look weird on
// controllers with >8 hotcue buttons, for example a Novation Launchpad.
QList<unsigned int>{0, 1, 2, 3, 4, 5, 6, 7});

const ColorPalette PredefinedColorPalettes::kSeratoDJIntroHotcueColorPalette =
ColorPalette(
Expand Down

0 comments on commit 84a43ec

Please sign in to comment.