diff --git a/module-apps/application-messages/MessagesStyle.hpp b/module-apps/application-messages/MessagesStyle.hpp index 99ad945cb..1d9ec0266 100644 --- a/module-apps/application-messages/MessagesStyle.hpp +++ b/module-apps/application-messages/MessagesStyle.hpp @@ -11,8 +11,10 @@ namespace style constexpr uint32_t listPositionX = style::window::default_left_margin; // Magic 1 -> discussed with Design for proper alignment. constexpr uint32_t ListPositionY = style::header::height - 1; - constexpr uint32_t listHeight = style::window_height - ListPositionY - style::footer::height; - constexpr uint32_t listWidth = style::listview::body_width_with_scroll; + // Bottom margin need to be added to fit all elements. + constexpr uint32_t listHeight = + style::window_height - ListPositionY - style::footer::height + style::margins::small; + constexpr uint32_t listWidth = style::listview::body_width_with_scroll; } // namespace threads namespace threadItem diff --git a/module-gui/gui/widgets/BoxLayout.hpp b/module-gui/gui/widgets/BoxLayout.hpp index 6bcee42ca..7fb90ab34 100644 --- a/module-gui/gui/widgets/BoxLayout.hpp +++ b/module-gui/gui/widgets/BoxLayout.hpp @@ -6,6 +6,7 @@ #include "Rect.hpp" #include #include "LayoutSizeStore.hpp" +#include "log/log.hpp" namespace gui { @@ -30,7 +31,7 @@ namespace gui }; template uint32_t sizeLeft(Item *it, Item::Area area = Item::Area::Min) { - return it->getSize(axis) - sizeUsed(it); + return (sizeUsed(it) >= it->getSize(axis)) ? 0 : it->getSize(axis) - sizeUsed(it); }; template void resizeItems();