fix(cairo): Increment textblock bg extents

This commit is contained in:
Michael Carlberg 2017-01-24 11:07:17 +01:00
parent 24a2d73ed1
commit 3e37b9ec8e
2 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,8 @@ namespace cairo {
{
*this << t.bg;
cairo_set_operator(m_c, static_cast<cairo_operator_t>(t.bg_operator));
cairo_rectangle(m_c, t.bg_rect.x, t.bg_rect.y, t.bg_rect.w + extents.x_advance, t.bg_rect.h);
cairo_rectangle(m_c, t.bg_rect.x + *t.x_advance, t.bg_rect.y + *t.y_advance,
t.bg_rect.w + extents.x_advance, t.bg_rect.h);
cairo_fill(m_c);
}
restore(true);

View File

@ -499,7 +499,6 @@ void renderer::draw_text(const string& contents) {
if (m_bg && m_bg != m_bar.background) {
block.bg = m_bg;
block.bg_operator = static_cast<cairo_operator_t>(m_comp_bg);
block.bg_rect.x = m_rect.x + m_blocks[m_align].x;
block.bg_rect.y = m_rect.y;
block.bg_rect.h = m_rect.height;
}