mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
LibGUI: Don't include invisible widgets in BoxLayout preferred size
This commit is contained in:
parent
4f4e6bc61b
commit
1e4b9a9cd9
1 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ int BoxLayout::preferred_primary_size() const
|
||||||
int size = 0;
|
int size = 0;
|
||||||
|
|
||||||
for (auto& entry : m_entries) {
|
for (auto& entry : m_entries) {
|
||||||
if (!entry.widget)
|
if (!entry.widget || !entry.widget->is_visible())
|
||||||
continue;
|
continue;
|
||||||
int min_size = entry.widget->min_size().primary_size_for_orientation(orientation());
|
int min_size = entry.widget->min_size().primary_size_for_orientation(orientation());
|
||||||
int max_size = entry.widget->max_size().primary_size_for_orientation(orientation());
|
int max_size = entry.widget->max_size().primary_size_for_orientation(orientation());
|
||||||
|
@ -87,7 +87,7 @@ int BoxLayout::preferred_secondary_size() const
|
||||||
{
|
{
|
||||||
int size = 0;
|
int size = 0;
|
||||||
for (auto& entry : m_entries) {
|
for (auto& entry : m_entries) {
|
||||||
if (!entry.widget)
|
if (!entry.widget || !entry.widget->is_visible())
|
||||||
continue;
|
continue;
|
||||||
int min_size = entry.widget->min_size().secondary_size_for_orientation(orientation());
|
int min_size = entry.widget->min_size().secondary_size_for_orientation(orientation());
|
||||||
int preferred_secondary_size = -1;
|
int preferred_secondary_size = -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue