Linear RGB blend a*(1-t) + b*t.
| 273 | |
| 274 | // Linear RGB blend a*(1-t) + b*t. |
| 275 | QColor blendColor(const QColor& a, const QColor& b, double t) { |
| 276 | const auto mix = [t](float x, float y) { return static_cast<float>((x * (1.0 - t)) + (y * t)); }; |
| 277 | return QColor::fromRgbF(mix(a.redF(), b.redF()), mix(a.greenF(), b.greenF()), mix(a.blueF(), b.blueF())); |
| 278 | } |
| 279 | |
| 280 | // Theme-derived timeline colours. The app syncs QPalette::Window / WindowText per |
| 281 | // theme (Theme::syncApplicationPalette) and QSS does NOT touch the palette, so a |