fix boxlayout adding extra spacing
This commit is contained in:
parent
55b8353d6d
commit
c02f286f01
1 changed files with 7 additions and 1 deletions
|
@ -57,7 +57,13 @@ void BoxLayout::run() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double space_per_unslotted_widget = free_space / unslotted_widgets - m_spacing;
|
double spacing_targets = (unslotted_widgets - 1);
|
||||||
|
if (spacing_targets < 0)
|
||||||
|
spacing_targets = 0;
|
||||||
|
|
||||||
|
free_space -= spacing_targets * m_spacing;
|
||||||
|
|
||||||
|
double space_per_unslotted_widget = free_space / unslotted_widgets;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < m_target->children().size(); i++) {
|
for (unsigned int i = 0; i < m_target->children().size(); i++) {
|
||||||
auto child = m_target->children()[i];
|
auto child = m_target->children()[i];
|
||||||
|
|
Loading…
Reference in a new issue