Revert "fix(parser): Use value stacks for %{R} tag #585"
This reverts commit d141d8b5e4
.
This commit is contained in:
parent
d141d8b5e4
commit
5af5292808
@ -47,7 +47,6 @@ class parser {
|
||||
std::stack<unsigned int> m_ul;
|
||||
std::stack<unsigned int> m_ol;
|
||||
std::stack<int> m_fonts;
|
||||
unsigned int m_reversed{0u};
|
||||
};
|
||||
|
||||
POLYBAR_NS_END
|
||||
|
@ -50,7 +50,6 @@ void parser::parse(const bar_settings& bar, string data) {
|
||||
m_ul = std::stack<unsigned int>();
|
||||
m_ol = std::stack<unsigned int>();
|
||||
m_fonts = std::stack<int>();
|
||||
m_reversed = 0u;
|
||||
|
||||
if (!m_actions.empty()) {
|
||||
throw unclosed_actionblocks(to_string(m_actions.size()) + " unclosed action block(s)");
|
||||
@ -84,7 +83,7 @@ void parser::codeblock(string&& data, const bar_settings& bar) {
|
||||
|
||||
switch (tag) {
|
||||
case 'B': {
|
||||
m_sig.emit(change_background{parse_color(m_bg, value, bar.background)});
|
||||
m_sig.emit(change_background{parse_color(m_bg, value, 0UL)});
|
||||
break;
|
||||
}
|
||||
|
||||
@ -111,13 +110,8 @@ void parser::codeblock(string&& data, const bar_settings& bar) {
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
if (++m_reversed % 2) {
|
||||
m_sig.emit(change_background{parse_color(m_fg, value, bar.foreground)});
|
||||
m_sig.emit(change_foreground{parse_color(m_bg, value, bar.background)});
|
||||
} else {
|
||||
m_sig.emit(change_foreground{parse_color(m_fg, value, bar.foreground)});
|
||||
m_sig.emit(change_background{parse_color(m_bg, value, bar.background)});
|
||||
}
|
||||
m_sig.emit(change_background{parse_color_string(value, bar.foreground)});
|
||||
m_sig.emit(change_foreground{parse_color_string(value, bar.background)});
|
||||
break;
|
||||
|
||||
case 'O':
|
||||
|
Loading…
Reference in New Issue
Block a user