summaryrefslogtreecommitdiff
path: root/plugingui/layout.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-05-19 19:09:17 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-05-19 19:09:17 +0200
commitff83cfac10939ceba524c93d4e36f634f4bec805 (patch)
treed481913f2136bf04d2d1deb650e6bd084a531676 /plugingui/layout.cc
parenta3dc9bd19f976cbc84ba3d1a16c72257b42b28ba (diff)
Make sure we don't resize to negative values.
Diffstat (limited to 'plugingui/layout.cc')
-rw-r--r--plugingui/layout.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugingui/layout.cc b/plugingui/layout.cc
index ea025bd..1e18c40 100644
--- a/plugingui/layout.cc
+++ b/plugingui/layout.cc
@@ -106,7 +106,8 @@ void BoxLayout::setSpacing(size_t spacing)
//
VBoxLayout::VBoxLayout(LayoutItem* parent)
- : BoxLayout(parent), align(HAlignment::center)
+ : BoxLayout(parent)
+ , align(HAlignment::center)
{
}
@@ -315,7 +316,7 @@ auto GridLayout::calculateCellSize() const -> CellSize
}
void GridLayout::moveAndResize(
- LayoutItem& item, GridRange const& range, CellSize cell_size) const
+ LayoutItem& item, GridRange const& range, CellSize cell_size) const
{
std::size_t x = range.column_begin * (cell_size.width + spacing);
std::size_t y = range.row_begin * (cell_size.height + spacing);