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:
parent
3ebb0b0b03
commit
ddb40db490
1 changed files with 2 additions and 7 deletions
|
@ -208,11 +208,6 @@ void builder::node(const label_t& label, bool add_space) {
|
|||
|
||||
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) {
|
||||
space(label->m_margin.left);
|
||||
}
|
||||
|
@ -248,10 +243,10 @@ void builder::node(const label_t& label, bool add_space) {
|
|||
color_close();
|
||||
}
|
||||
|
||||
if (!label->m_underline.empty() || (label->m_margin.right > 0 && m_tags[syntaxtag::u] > 0)) {
|
||||
if (!label->m_underline.empty()) {
|
||||
underline_close();
|
||||
}
|
||||
if (!label->m_overline.empty() || (label->m_margin.right > 0 && m_tags[syntaxtag::o] > 0)) {
|
||||
if (!label->m_overline.empty()) {
|
||||
overline_close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue