Skip to content

Commit 947357b

Browse files
committed
fix: wrong assertion in grid_layout
1 parent 5a7be73 commit 947357b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ui/layouts/grid_layout.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void ui::GridLayout::render(const ServiceProvider& service_provider) const {
5353
x_pos += margin_x + total_width;
5454
} else {
5555
const u32 total_margin = this->m_size <= 1 ? 0 : (this->m_size - 1) * m_gap.get_margin();
56-
assert(layout().get_rect().height() > (total_margin - (m_margin.second * 2))
56+
assert(layout().get_rect().height() > (total_margin + (m_margin.second * 2))
5757
&& "height has to be greater than the margins");
5858
height = (layout().get_rect().height() - total_margin - (m_margin.second * 2)) / this->m_size;
5959

0 commit comments

Comments
 (0)