Backends: don't resize the WindowItem in set_visible

We already query the size right after the call to set_visible in the
WindowInner::show()
This commit is contained in:
Olivier Goffart 2023-08-24 13:15:28 +02:00 committed by GitHub
parent ff3ca79258
commit 541e7137c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 28 deletions

View file

@ -86,8 +86,6 @@ private:
/// slint::platform::AbstractRenderer &renderer() override { return m_renderer; }
/// void set_visible(bool v) override {
/// if (v) {
/// window().dispatch_resize_event(slint::LogicalSize(
/// { float(m_native_window.width), float(m_native_window.height) }));
/// m_native_window.show();
/// } else {
/// m_native_window.hide();
@ -148,8 +146,8 @@ public:
///
/// Re-implement this function to forward the call to show/hide the native window
///
/// When the window becomes visible, this is a good place to send
/// slint::Window::dispatch_resize_event and slint::Window::dispatch_scale_factor_change_event
/// When the window becomes visible, this is a good time to call
/// slint::Window::dispatch_scale_factor_change_event to initialise the scale factor.
virtual void set_visible(bool) { }
/// This function is called when Slint detects that the window need to be repainted.