MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / UpdateCustomPalette

Method UpdateCustomPalette

Xaml/Controls/ColorPicker.cpp:1227–1248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

Calls 3

ShadeCountMethod · 0.80
ColorCountMethod · 0.80
GetColorMethod · 0.80

Tested by

no test coverage detected