Replies: 1 comment
-
btw, a work around that works is calling hide/show instead of request_redraw. let ui = ui_handle.unwrap();
let win = ui.window();
let mut s = win.size();
let _ = win.hide();
s.width = w;
s.height= h;
win.set_size(s);
log::debug!("Set size to {:?}", s);
let _ = win.show(); // NOTE: hide() and show() are to fix layout recalculation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a window that resizes fine when done via the window manager, but does something weird with
.set_size()
.I tried to create a simplified test case, and after 2h I couldn't reproduce the issue, so it must be something strange with my nesting of components. Even though I don't do anything weird with sizes anywhere (it's mostly GridBoxes and GridLayouts). ...Is there a way to dump layout information in cases like this? Since it only happens after the call to this method, the tooling is of no help.
While the issue (some 20px of ghost space on the right) happens 100% on
.set_size()
, any small rese via the window manager and things fall into place (as they were before the.set_size()
!)..request_redraw()
does not help. Delays do not help. Tried to simplify to the max my tree and removed any and all use of*width|*height
besides the main window. If i manually resize between the set_size calls, things fall into place, then back to the weird space on the right again.Beta Was this translation helpful? Give feedback.
All reactions