mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-02 11:59:58 +00:00
Fix some color indicators that aren't visible with specific selected colors
This commit is contained in:
parent
afdf156a0e
commit
018d5dc4a9
@ -204,10 +204,11 @@ void ColorSelector::onPaintAlphaBar(ui::Graphics* g, const gfx::Rect& rc)
|
||||
{
|
||||
draw_alpha_slider(g, rc, m_color);
|
||||
|
||||
const double lit = m_color.getHslLightness();
|
||||
const int alpha = m_color.getAlpha();
|
||||
const gfx::Point pos(rc.x + int(rc.w * alpha / 255),
|
||||
rc.y + rc.h/2);
|
||||
paintColorIndicator(g, pos, false);
|
||||
paintColorIndicator(g, pos, lit < 0.5);
|
||||
}
|
||||
|
||||
void ColorSelector::paintColorIndicator(ui::Graphics* g,
|
||||
|
@ -100,7 +100,7 @@ void ColorSpectrum::onPaintBottomBar(ui::Graphics* g, const gfx::Rect& rc)
|
||||
double sat = m_color.getHslSaturation();
|
||||
gfx::Point pos(rc.x + int(double(rc.w) * sat),
|
||||
rc.y + rc.h/2);
|
||||
paintColorIndicator(g, pos, false);
|
||||
paintColorIndicator(g, pos, lit < 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ void ColorWheel::onPaintMainArea(ui::Graphics* g, const gfx::Rect& rc)
|
||||
gfx::Point(int(+std::cos(PI*angle/180.0)*double(m_wheelRadius)*dist),
|
||||
int(-std::sin(PI*angle/180.0)*double(m_wheelRadius)*dist));
|
||||
|
||||
paintColorIndicator(g, pos, false);
|
||||
paintColorIndicator(g, pos, color.getHsvValue() < 0.5);
|
||||
|
||||
g->fillRect(gfx::rgba(color.getRed(),
|
||||
color.getGreen(),
|
||||
@ -221,7 +221,7 @@ void ColorWheel::onPaintBottomBar(ui::Graphics* g, const gfx::Rect& rc)
|
||||
double val = m_color.getHsvValue();
|
||||
gfx::Point pos(rc.x + int(double(rc.w) * val),
|
||||
rc.y + rc.h/2);
|
||||
paintColorIndicator(g, pos, false);
|
||||
paintColorIndicator(g, pos, val < 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user