From cab2d495324b05d8b94fadfe6f20c7a465068b4a Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Fri, 9 Dec 2016 02:44:12 +0100 Subject: [PATCH] fix: Module margin Only output module margin right when there are preceeding modules. --- src/components/controller.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/controller.cpp b/src/components/controller.cpp index 5539addf..c28fb3dd 100644 --- a/src/components/controller.cpp +++ b/src/components/controller.cpp @@ -501,6 +501,10 @@ void controller::on_update(bool force) { continue; } + if (!block_contents.empty() && !(is_right && module == block.second.back())) { + block_contents += string(margin_right, ' '); + } + if (!block_contents.empty() && !separator.empty()) { block_contents += separator; } @@ -510,10 +514,6 @@ void controller::on_update(bool force) { } block_contents += module->contents(); - - if (!(is_right && module == block.second.back())) { - block_contents += string(margin_right, ' '); - } } if (block_contents.empty()) {