Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression when overriding the with of a Component that specifies…
… limits We were comparing the priorities of different component, which does not make sense This is a regression found with the crater run
- Loading branch information
Showing
2 changed files
with
81 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* LICENSE BEGIN | ||
This file is part of the SixtyFPS Project -- https://sixtyfps.io | ||
Copyright (c) 2021 Olivier Goffart <olivier.goffart@sixtyfps.io> | ||
Copyright (c) 2021 Simon Hausmann <simon.hausmann@sixtyfps.io> | ||
|
||
SPDX-License-Identifier: GPL-3.0-only | ||
This file is also available under commercial licensing terms. | ||
Please contact info@sixtyfps.io for more information. | ||
LICENSE END */ | ||
|
||
ComboBox := Rectangle { | ||
min-width: 60px; | ||
} | ||
|
||
SubComp1 := Rectangle { | ||
HorizontalLayout { | ||
ComboBox { | ||
width: 200px; | ||
} | ||
} | ||
} | ||
|
||
SubComp2 := HorizontalLayout { | ||
ComboBox { | ||
width: 200px; | ||
} | ||
} | ||
|
||
SubComp3 := HorizontalLayout { | ||
max-width: 500px; | ||
Rectangle { } | ||
} | ||
|
||
|
||
TestCase := Rectangle { | ||
width: 300phx; | ||
height: 300phx; | ||
|
||
sc1 := SubComp1 {} | ||
sc2 := SubComp2 {} | ||
// FIXME: the HorizontalLayout is required here because the sc3.max-width takes the existing binding instead of being re-materialized | ||
sc3 := HorizontalLayout { SubComp3 { width: 200px; } } | ||
property<bool> test: sc1.min-width == 200px && sc2.min-width == 200px && sc3.max-width == 200px; | ||
} | ||
|