Indent colored-layer part for nested layers

Request: https://community.aseprite.org/t/3658
This commit is contained in:
David Capello 2019-08-12 19:47:42 -03:00
parent 2a42cc1bf6
commit b6de9d924b

View File

@ -2107,9 +2107,16 @@ void Timeline::drawLayer(ui::Graphics* g, int layerIdx)
(hotlayer && m_hot.part == PART_ROW_TEXT),
(clklayer && m_clk.part == PART_ROW_TEXT));
drawPart(g, textBounds,
&layer->name(),
styles.timelineLayer(),
is_active,
(hotlayer && m_hot.part == PART_ROW_TEXT),
(clklayer && m_clk.part == PART_ROW_TEXT));
if (doc::rgba_geta(layerColor) > 0) {
// Fill with an user-defined custom color.
auto b2 = bounds;
auto b2 = textBounds;
b2.shrink(1*guiscale()).inflate(1*guiscale());
g->fillRect(gfx::rgba(doc::rgba_getr(layerColor),
doc::rgba_getg(layerColor),
@ -2124,14 +2131,6 @@ void Timeline::drawLayer(ui::Graphics* g, int layerIdx)
(hotlayer && m_hot.part == PART_ROW_TEXT),
(clklayer && m_clk.part == PART_ROW_TEXT));
}
else {
drawPart(g, textBounds,
&layer->name(),
styles.timelineLayer(),
is_active,
(hotlayer && m_hot.part == PART_ROW_TEXT),
(clklayer && m_clk.part == PART_ROW_TEXT));
}
if (layer->isBackground()) {
int s = ui::guiscale();