| 1225 | } |
| 1226 | |
| 1227 | void ColorPicker::UpdateCustomPalette() |
| 1228 | { |
| 1229 | if (const auto palette = CustomPalette()) |
| 1230 | { |
| 1231 | const auto shadeCount = palette.ShadeCount(); |
| 1232 | const auto colorCount = palette.ColorCount(); |
| 1233 | |
| 1234 | CustomPaletteColumnCount(colorCount); |
| 1235 | |
| 1236 | if (const auto colors = CustomPaletteColors()) |
| 1237 | { |
| 1238 | colors.Clear(); |
| 1239 | for (uint32_t shadeIndex = 0; shadeIndex < shadeCount; ++shadeIndex) |
| 1240 | { |
| 1241 | for (uint32_t colorIndex = 0; colorIndex < colorCount; ++colorIndex) |
| 1242 | { |
| 1243 | colors.Append(palette.GetColor(colorIndex, shadeIndex)); |
| 1244 | } |
| 1245 | } |
| 1246 | } |
| 1247 | } |
| 1248 | } |
| 1249 | |
| 1250 | txmp::ColorRepresentation ColorPicker::GetActiveColorRepresentation() |
| 1251 | { |
no test coverage detected