mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
parent
3f5141bf22
commit
389bae2669
1 changed files with 5 additions and 0 deletions
|
@ -399,6 +399,11 @@ double renderer::block_x(alignment a) const {
|
|||
if ((min_pos = block_w(alignment::LEFT))) {
|
||||
min_pos += BLOCK_GAP;
|
||||
}
|
||||
if (m_rect.x > 0) {
|
||||
base_pos -= (m_bar.size.w - m_rect.width) / 2.0;
|
||||
} else {
|
||||
base_pos += (m_bar.size.w - m_rect.width) / 2.0;
|
||||
}
|
||||
return std::max(base_pos - block_w(a) / 2.0, min_pos);
|
||||
}
|
||||
case alignment::RIGHT: {
|
||||
|
|
Loading…
Reference in a new issue