64 lines
2.3 KiB
Diff
64 lines
2.3 KiB
Diff
--- src/waveform/renderers/waveformrendererhsv.cpp
|
|
+++ src/waveform/renderers/waveformrendererhsv.cpp
|
|
@@ -69,7 +69,7 @@ void WaveformRendererHSV::draw(QPainter*
|
|
allGain *= factory->getVisualGain(::WaveformWidgetFactory::All);
|
|
|
|
// Save HSV of waveform color
|
|
- double h,s,v;
|
|
+ qreal h,s,v;
|
|
|
|
// Get base color of waveform in the HSV format (s and v isn't use)
|
|
m_pColors->getLowColor().getHsvF(&h,&s,&v);
|
|
--- src/waveform/renderers/waveformsignalcolors.cpp
|
|
+++ src/waveform/renderers/waveformsignalcolors.cpp
|
|
@@ -68,14 +68,14 @@ void WaveformSignalColors::fallBackFromS
|
|
qWarning() << "WaveformSignalColors::fallBackFromSignalColor - " \
|
|
"skin do not provide low/mid/high signal colors";
|
|
|
|
- double h,s,l,a;
|
|
+ qreal h,s,l,a;
|
|
m_signalColor.getHslF(&h,&s,&l,&a);
|
|
|
|
const double analogousAngle = 1.0/12.0;
|
|
|
|
if( s < 0.1) // gray
|
|
{
|
|
- const double sMax = 1.0 - h;
|
|
+ const qreal sMax = 1.0 - h;
|
|
m_lowColor.setHslF(h,s,l);
|
|
m_midColor.setHslF(h,s+sMax*0.2,l);
|
|
m_highColor.setHslF(h,s+sMax*0.4,l);
|
|
@@ -84,28 +84,28 @@ void WaveformSignalColors::fallBackFromS
|
|
{
|
|
if( l < 0.1) // ~white
|
|
{
|
|
- const double lMax = 1.0 - l;
|
|
+ const qreal lMax = 1.0 - l;
|
|
m_lowColor.setHslF(h,s,l);
|
|
m_midColor.setHslF(h,s,l+lMax*0.2);
|
|
m_highColor.setHslF(h,s,l+lMax*0.4);
|
|
}
|
|
else if( l < 0.5)
|
|
{
|
|
- const double lMax = 1.0 - l;
|
|
+ const qreal lMax = 1.0 - l;
|
|
m_lowColor.setHslF(h,s,l);
|
|
m_midColor.setHslF(stableHue(h-analogousAngle*0.3),s,l+lMax*0.1);
|
|
m_highColor.setHslF(stableHue(h+analogousAngle*0.3),s,l+lMax*0.4);
|
|
}
|
|
else if ( l < 0.9)
|
|
{
|
|
- const double lMin = l;
|
|
+ const qreal lMin = l;
|
|
m_lowColor.setHslF(h,s,l);
|
|
m_midColor.setHslF(stableHue(h-analogousAngle*0.3),s,l-lMin*0.1);
|
|
m_highColor.setHslF(stableHue(h+analogousAngle*0.3),s,l-lMin*0.4);
|
|
}
|
|
else // ~black
|
|
{
|
|
- const double lMin = l;
|
|
+ const qreal lMin = l;
|
|
m_lowColor.setHslF(h,s,l);
|
|
m_midColor.setHslF(h,s,l-lMin*0.2);
|
|
m_highColor.setHslF(h,s,l-lMin*0.4);
|