mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
parent
9f594e8aa3
commit
04a3729c03
@ -93,7 +93,8 @@
|
||||
<color id="timeline_clicked" value="#536069" />
|
||||
<color id="timeline_clicked_text" value="#ffffff" />
|
||||
<color id="timeline_padding" value="#7d929e" />
|
||||
<color id="timeline_band_highlight" value="#bec8ce" />
|
||||
<color id="timeline_band_highlight" value="#93adbb" />
|
||||
<color id="timeline_band_bg" value="#76858e" />
|
||||
<color id="status_bar_text" value="#2e3234" />
|
||||
<color id="status_bar_face" value="#7d929e" />
|
||||
<color id="flag_normal" value="#d3cbbe" />
|
||||
|
@ -2060,15 +2060,16 @@ void Timeline::drawFrameTags(ui::Graphics* g)
|
||||
g->fillRect(theme->colors.timelineBandHighlight(), bandBounds);
|
||||
}
|
||||
|
||||
std::vector<unsigned char> tagsPerFrame(m_sprite->totalFrames(), 0);
|
||||
|
||||
int passes = (m_tagFocusBand >= 0 ? 2: 1);
|
||||
for (int pass=0; pass<passes; ++pass) {
|
||||
for (FrameTag* frameTag : m_sprite->frameTags()) {
|
||||
int band = -1;
|
||||
if (m_tagFocusBand >= 0) {
|
||||
auto it = m_tagBand.find(frameTag);
|
||||
if (it != m_tagBand.end()) {
|
||||
band = it->second;
|
||||
if (band != m_tagFocusBand)
|
||||
if ((pass == 0 && band == m_tagFocusBand) ||
|
||||
(pass == 1 && band != m_tagFocusBand))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -2080,7 +2081,9 @@ void Timeline::drawFrameTags(ui::Graphics* g)
|
||||
bounds.h = bounds.y2() - frameTagBounds.y2();
|
||||
bounds.y = frameTagBounds.y2();
|
||||
|
||||
gfx::Color bg = frameTag->color();
|
||||
gfx::Color bg =
|
||||
(m_tagFocusBand < 0 || pass == 1) ?
|
||||
frameTag->color(): theme->colors.timelineBandBg();
|
||||
{
|
||||
IntersectClip clip(g, bounds);
|
||||
if (clip) {
|
||||
@ -2095,7 +2098,7 @@ void Timeline::drawFrameTags(ui::Graphics* g)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
if (m_tagFocusBand < 0 || pass == 1) {
|
||||
bounds = frameTagBounds;
|
||||
|
||||
if (m_clk.part == PART_FRAME_TAG && m_clk.frameTag == frameTag->id()) {
|
||||
@ -2121,10 +2124,6 @@ void Timeline::drawFrameTags(ui::Graphics* g)
|
||||
gfx::ColorNone,
|
||||
bounds.origin());
|
||||
}
|
||||
|
||||
for (frame_t f=frameTag->fromFrame(); f<=frameTag->toFrame(); ++f) {
|
||||
if (tagsPerFrame[f] < 255)
|
||||
++tagsPerFrame[f];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user