xkeyboard: Fix indicator spacing ()

* 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  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:
Filip Banák 2020-12-17 20:49:10 +01:00 committed by GitHub
parent fd556525a8
commit 6f13fe93a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions
src/modules

View file

@ -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 {