MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / sliceColorForOverlay

Function sliceColorForOverlay

src/gui/SpectrumWidget.cpp:4572–4576  ·  view source on GitHub ↗

Variant that respects the SliceLetterDisplay mode (#2606): when set to RadioIndexed, the colour follows the radio-provided per-client letter rather than the global slice id so the slice marker / passband colour keeps pace with the badge above the VFO.

Source from the content-addressed store, hash-verified

4570// rather than the global slice id so the slice marker / passband colour
4571// keeps pace with the badge above the VFO.
4572static QColor sliceColorForOverlay(const SpectrumWidget::SliceOverlay& so) {
4573 const int colourIdx = SliceLabel::displayColorIndex(so.sliceId, so.perClientLetter);
4574 if (so.isActive) return SliceColorManager::instance().activeColor(colourIdx);
4575 return SliceColorManager::instance().dimColor(colourIdx);
4576}
4577
4578// ─── Multi-slice overlay management ──────────────────────────────────────────
4579

Callers 2

drawSliceMarkersMethod · 0.85
drawOffScreenSlicesMethod · 0.85

Calls 3

displayColorIndexFunction · 0.85
activeColorMethod · 0.80
dimColorMethod · 0.80

Tested by

no test coverage detected