xkeyboard: Fix indicator spacing (#2306)
* Fix xkeyboard module spacing between the layout and indicators when indicators are empty. * Simplify the empty label check. * Remove permanently enabled SCROLL_LOCK, sorry. * Another mistake. * Update src/modules/xkeyboard.cpp Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com> * Update src/modules/xkeyboard.cpp Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com> * Update. * Fix xkeyboard module spacing between the layout and indicators, when indicators are empty. And fix the spacing between indicators when some are empty. * Add issue #2292 to fixed. * Update CHANGELOG.md Co-authored-by: Filip Banák <6111455-Filip62@users.noreply.gitlab.com> Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
This commit is contained in:
parent
fd556525a8
commit
6f13fe93a3
2 changed files with 8 additions and 3 deletions
src/modules
|
@ -191,10 +191,12 @@ namespace modules {
|
|||
} else if (tag == TAG_LABEL_INDICATOR && !m_indicators.empty()) {
|
||||
size_t n{0};
|
||||
for (auto&& indicator : m_indicators) {
|
||||
if (n++) {
|
||||
builder->space(m_formatter->get(DEFAULT_FORMAT)->spacing);
|
||||
if (*indicator.second) {
|
||||
if (n++) {
|
||||
builder->space(m_formatter->get(DEFAULT_FORMAT)->spacing);
|
||||
}
|
||||
builder->node(indicator.second);
|
||||
}
|
||||
builder->node(indicator.second);
|
||||
}
|
||||
return n > 0;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue