Timeline: fix minor details in padding drawing code

This commit is contained in:
David Capello 2013-12-15 17:49:46 -03:00
parent 9e138c263f
commit ccb24cad35
2 changed files with 13 additions and 8 deletions

View File

@ -294,10 +294,10 @@
<part id="timeline_fromboth_normal" x="240" y="108" w="12" h="12" />
<part id="timeline_fromboth_active" x="252" y="108" w="12" h="12" />
<part id="timeline_gear" x="264" y="12" w="12" h="12" />
<part id="timeline_padding" x="276" y="12" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" />
<part id="timeline_padding_tr" x="288" y="12" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" />
<part id="timeline_padding_bl" x="276" y="24" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" />
<part id="timeline_padding_br" x="288" y="24" w1="2" w2="8" w3="2" h1="2" h2="8" h3="2" />
<part id="timeline_padding" x="276" y="12" w1="1" w2="10" w3="1" h1="1" h2="10" h3="1" />
<part id="timeline_padding_tr" x="288" y="12" w1="1" w2="10" w3="1" h1="1" h2="10" h3="1" />
<part id="timeline_padding_bl" x="276" y="24" w1="1" w2="10" w3="1" h1="1" h2="10" h3="1" />
<part id="timeline_padding_br" x="288" y="24" w1="1" w2="10" w3="1" h1="1" h2="10" h3="1" />
</parts>
<stylesheet>

View File

@ -2252,10 +2252,15 @@ void SkinTheme::draw_bounds_nw(ui::Graphics* g, const gfx::Rect& rc, const SkinP
// Center
if (!is_transparent(bg)) {
g->fillRect(bg, Rect(rc).shrink(Border(skinPart->getBitmap(7)->w,
skinPart->getBitmap(1)->h,
skinPart->getBitmap(3)->w,
skinPart->getBitmap(5)->h)));
gfx::Rect inside = rc;
inside.shrink(Border(
skinPart->getBitmap(7)->w,
skinPart->getBitmap(1)->h,
skinPart->getBitmap(3)->w,
skinPart->getBitmap(5)->h));
if (IntersectClip clip = IntersectClip(g, inside))
g->fillRect(bg, inside);
}
}