diff --git a/include/cairo/context.hpp b/include/cairo/context.hpp index 02fe7a8a..591b4895 100644 --- a/include/cairo/context.hpp +++ b/include/cairo/context.hpp @@ -190,7 +190,8 @@ namespace cairo { { *this << t.bg; cairo_set_operator(m_c, static_cast(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); diff --git a/src/components/renderer.cpp b/src/components/renderer.cpp index 45338b1c..0752fbdb 100644 --- a/src/components/renderer.cpp +++ b/src/components/renderer.cpp @@ -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(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; }