Closed windoze closed 1 month ago
you may need to set SMenu height: 100%
, and if you need to expand or shrink the window, try fresh the window or reset the menu height. Other wise you can set the height as parent.height
Added height: 100%;
in SMenu, nothing changed, kinda weird. I checked the source code and didn't see anything suspicious.
https://github.com/user-attachments/assets/2126f500-890a-431a-b3cd-0ceaa2c743db
Actually I also tried to put the slint UI into a Rust app, the window cannot be vertically shrinked as well, the behavior was identical to the Sline preview.
The resizing is back to be working if I replace the SMenu
by something else like:
Rectangle {
height: 100%;
width: 40px;
background: #053320;
}
SMenu inherits SCard, It may because SCard has bind height, and SMenu has bind height too. you do not set any option props, so SMenu keep the default
You may need to check your version, is that V0.5.0? I test it, it seems no issue
https://github.com/user-attachments/assets/d2bc68b5-769c-4f95-a631-48a08f5ec873
this test is in test package: https://github.com/Surrealism-All/SurrealismUI/blob/main/tests/src/menu.slint you just need to remove the window height and width
Everything back to work when I added:
x: 0;
y: 0;
to the container that contains SMenu
.
Such a magic...
Not sure if it's a bug or a feature after all.
A minimal example:
The AppWindow's height can be extended, but cannot be shrinked back.