mirror of
				https://github.com/slint-ui/slint.git
				synced 2025-11-04 05:34:37 +00:00 
			
		
		
		
	To keep compatibility with existing Slint code
Commit 53e79000a4 added a call to
LayoutConstraints::new which is shown to produce error in the crater
run.
		
	
			
		
			
				
	
	
		
			45 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
// Copyright © SixtyFPS GmbH <info@slint.dev>
 | 
						|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
 | 
						|
 | 
						|
export component Test inherits Rectangle {
 | 
						|
 | 
						|
    GridLayout {
 | 
						|
        Rectangle {
 | 
						|
            height: 42px;
 | 
						|
//                  ^error{Cannot specify both 'height' and 'min-height'}
 | 
						|
            min-height: 42px;
 | 
						|
            max-width: 42px;
 | 
						|
        }
 | 
						|
        Rectangle {
 | 
						|
            width: 42px;
 | 
						|
//                 ^error{Cannot specify both 'width' and 'max-width'}
 | 
						|
            min-height: 42px;
 | 
						|
            max-width: 42px;
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    // outside a layout
 | 
						|
    Rectangle {
 | 
						|
        width: 42px;
 | 
						|
//             ^error{Cannot specify both 'width' and 'min-width'}
 | 
						|
        min-width: 5rem;
 | 
						|
    }
 | 
						|
 | 
						|
    Rectangle {
 | 
						|
        // Slint 1.8 and earlier did not complain about extra specifications when the item is not in a layout
 | 
						|
        // contains a layout that's why it's a warning instead now
 | 
						|
        height: 10rem;
 | 
						|
//              ^warning{Cannot specify both 'height' and 'min-height'}
 | 
						|
        min-height: 8rem;
 | 
						|
        HorizontalLayout {
 | 
						|
            Rectangle {
 | 
						|
                height: 42px;
 | 
						|
//                      ^error{Cannot specify both 'height' and 'max-height'}
 | 
						|
                max-height: 12px;
 | 
						|
 | 
						|
            }
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
}
 |