1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-18 13:55:11 -05:00

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; *this << t.bg;
cairo_set_operator(m_c, static_cast<cairo_operator_t>(t.bg_operator)); 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); cairo_fill(m_c);
} }
restore(true); restore(true);

View file

@ -499,7 +499,6 @@ void renderer::draw_text(const string& contents) {
if (m_bg && m_bg != m_bar.background) { if (m_bg && m_bg != m_bar.background) {
block.bg = m_bg; block.bg = m_bg;
block.bg_operator = static_cast<cairo_operator_t>(m_comp_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.y = m_rect.y;
block.bg_rect.h = m_rect.height; block.bg_rect.h = m_rect.height;
} }