From b6de9d924b50848875dcec59246aabb5916fdd3f Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 12 Aug 2019 19:47:42 -0300 Subject: [PATCH] Indent colored-layer part for nested layers Request: https://community.aseprite.org/t/3658 --- src/app/ui/timeline/timeline.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/app/ui/timeline/timeline.cpp b/src/app/ui/timeline/timeline.cpp index b37e11c97..ed703eb52 100644 --- a/src/app/ui/timeline/timeline.cpp +++ b/src/app/ui/timeline/timeline.cpp @@ -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();