From ccb24cad35e8715e7c22bfe9e8a7514b5f22abdf Mon Sep 17 00:00:00 2001 From: David Capello Date: Sun, 15 Dec 2013 17:49:46 -0300 Subject: [PATCH] Timeline: fix minor details in padding drawing code --- data/skins/default/skin.xml | 8 ++++---- src/app/ui/skin/skin_theme.cpp | 13 +++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/data/skins/default/skin.xml b/data/skins/default/skin.xml index a2966f4e5..78dfe8b48 100644 --- a/data/skins/default/skin.xml +++ b/data/skins/default/skin.xml @@ -294,10 +294,10 @@ - - - - + + + + diff --git a/src/app/ui/skin/skin_theme.cpp b/src/app/ui/skin/skin_theme.cpp index 429904538..04ff190a2 100644 --- a/src/app/ui/skin/skin_theme.cpp +++ b/src/app/ui/skin/skin_theme.cpp @@ -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); } }