SMenu、SHeader在界面最大化的时候,高、宽没有跟随界面变化 #21
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
请注意,这并不是issue |
Beta Was this translation helpful? Give feedback.
-
若你想要获取Window最大化后的大小可以使用API: |
Beta Was this translation helpful? Give feedback.
-
https://slint.dev/releases/1.3.2/docs/rust/slint/struct.Window |
Beta Was this translation helpful? Give feedback.
请注意,这并不是issue
请仔细阅读Slint对原生Window内置组件的描述:
The Window geometry will be restricted by its layout constraints: Setting the width will result in a fixed width, and the window manager will respect the min-width and max-width so the window can’t be resized bigger or smaller. The initial width can be controlled with the preferred-width property. The same applies to the Windows height.
意思是Window受到布局约束,它的宽度由min-width和max-width进行限定,因此它无法被重置大小,它的初始化由preferred-width控制,它的高也一样