MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / selectColor

Method selectColor

src/app/ui/palette_view.cpp:99–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void PaletteView::selectColor(int index)
100{
101 if (index < 0 || index >= currentPalette()->size())
102 return;
103
104 if (m_currentEntry != index || !m_selectedEntries[index]) {
105 m_currentEntry = index;
106 m_rangeAnchor = index;
107
108 update_scroll(m_currentEntry);
109 invalidate();
110 }
111}
112
113void PaletteView::selectExactMatchColor(const app::Color& color)
114{

Callers 4

setColorMethod · 0.45
findBestfitIndexMethod · 0.45
setColorSelectorMethod · 0.45
onColorButtonChangeMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected