Open hanzuken opened 7 months ago
Slint version: v1.5.0 Backend: Winit-skia Sample code: appwindow.slint
export component AppWindow inherits Window { no-frame: !self.has-header; width: 800px; height: 600px; in-out property<bool> has-header: false; callback show-hide-header(); VerticalBox { Button { text: "Show/hide header"; clicked => { root.show-hide-header(); } } } }
main.cpp
#include "appwindow.h" #include <iostream> int main(int argc, char **argv) { auto ui = AppWindow::create(); ui->on_show_hide_header([&]{ ui->set_has_header(!ui->get_has_header()); auto size = ui->window().size(); std::cout << "size: " << size.width << "x" << size.height << std::endl; }); ui->run(); return 0; }
Expected: The window size should be kept the same Actual: The window size has been reduced and the entire app cannot be viewed.
What windowing system / operating system are you using? (I tried reproducing this on macOS, Gnome with Wayland, as well as Windows 10)
Slint version: v1.5.0 Backend: Winit-skia Sample code: appwindow.slint
main.cpp
Expected: The window size should be kept the same Actual: The window size has been reduced and the entire app cannot be viewed.