Skip to content

Commit 28cb558

Browse files
committed
Force minimum amount of children per line
Fixes #228
1 parent 571b9b2 commit 28cb558

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

grid/grid_classes.cc

+7-2
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,13 @@ inline auto refresh_max_children_per_line = [](auto& flowbox, auto& container, a
393393
auto size = container.size();
394394
decltype(size) cols = num_col;
395395
if (auto min = std::min(cols, size)) { // suppress gtk warnings about size=0
396-
//flowbox.set_min_children_per_line(std::min(size, cols));
397-
flowbox.set_max_children_per_line(std::min(size, cols));
396+
// When some items have long captions,
397+
// flowbox may decide to reduce the number of columns
398+
// to make all captions display un-omitted.
399+
// We don't want that. So we'll force minimum amount of items
400+
// per line of flowbox.
401+
flowbox.set_min_children_per_line(min);
402+
flowbox.set_max_children_per_line(min);
398403
}
399404
};
400405

0 commit comments

Comments
 (0)