mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-30 15:17:25 +00:00
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:
parent
ff3ca79258
commit
541e7137c6
3 changed files with 5 additions and 28 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue