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

builder: Cleanup label over-/underline handling

There really is no reason to also close over/underline tags when we have
a right margin and a non-black over/underline color.
The git blame for these lines also doesn't give us any insights as to
why it was done this way.
This commit is contained in:
patrick96 2018-12-28 17:16:43 +01:00 committed by Patrick Ziegler
parent 3ebb0b0b03
commit ddb40db490

View file

@ -208,11 +208,6 @@ void builder::node(const label_t& label, bool add_space) {
auto text = get_label_text(label); auto text = get_label_text(label);
// if ((label->m_overline.empty() && m_tags[syntaxtag::o] > 0) || (m_tags[syntaxtag::o] > 0 && label->m_margin > 0))
// overline_close();
// if ((label->m_underline.empty() && m_tags[syntaxtag::u] > 0) || (m_tags[syntaxtag::u] > 0 && label->m_margin > 0))
// underline_close();
if (label->m_margin.left > 0) { if (label->m_margin.left > 0) {
space(label->m_margin.left); space(label->m_margin.left);
} }
@ -248,10 +243,10 @@ void builder::node(const label_t& label, bool add_space) {
color_close(); color_close();
} }
if (!label->m_underline.empty() || (label->m_margin.right > 0 && m_tags[syntaxtag::u] > 0)) { if (!label->m_underline.empty()) {
underline_close(); underline_close();
} }
if (!label->m_overline.empty() || (label->m_margin.right > 0 && m_tags[syntaxtag::o] > 0)) { if (!label->m_overline.empty()) {
overline_close(); overline_close();
} }