You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { Button } from"std-widgets.slint";
exportcomponentDemo {
preferred-width: 500px;
preferred-height: 500px;
Button {
// Commenting this property out, or making it an empty// string makes the component tiny and unresizable.text: "Foo";
}
}
I got to this code by reducing my app drastically. My actual use case is calling Window::set_size() on the Rust side before app_window.show(), which stays ineffective just like when using the preferred-... properties. In contrast to this example, though, my app window behaves normal (displaying in preferred, i.e., minimal size, and being normally resizable); Window::set_size() is simply ineffective, preventing me to restore the size saved on last app termination.
Above example on Windows 10 with text property being set to "Foo":
okay.mp4
Same example with text property commented out:
not-okay.mp4
The text was updated successfully, but these errors were encountered:
ogoffart
added
bug
Something isn't working
a:layouts
Related to the layouting and positioning of the elements (mO,bT)
and removed
need triaging
Issue that the owner of the area still need to triage
labels
Oct 14, 2024
Consider this SlintPad demo (see comment):
I got to this code by reducing my app drastically. My actual use case is calling
Window::set_size()
on the Rust side beforeapp_window.show()
, which stays ineffective just like when using thepreferred-...
properties. In contrast to this example, though, my app window behaves normal (displaying in preferred, i.e., minimal size, and being normally resizable);Window::set_size()
is simply ineffective, preventing me to restore the size saved on last app termination.Above example on Windows 10 with
text
property being set to"Foo"
:okay.mp4
Same example with
text
property commented out:not-okay.mp4
The text was updated successfully, but these errors were encountered: