gpui: Support window resizing for PlatformWindow
(#27477)
Support resizing windows to a specified size. ## macOS https://github.com/user-attachments/assets/8c639bc2-ee5f-4adc-a850-576dac939574 ## Wayland [wayland.webm](https://github.com/user-attachments/assets/3d593604-83b4-488f-8f63-1cf4c0c0cb9a) ## X11 [x11.webm](https://github.com/user-attachments/assets/ce8fa62e-fb74-4641-abe8-70574011e630) ## Windows https://github.com/user-attachments/assets/abb03e48-f82a-4d62-90b3-2598a4866c3f Release Notes: - N/A
This commit is contained in:
parent
f86977e2a7
commit
b4254a33e0
8 changed files with 111 additions and 2 deletions
|
@ -1320,6 +1320,11 @@ impl Window {
|
|||
self.platform_window.bounds()
|
||||
}
|
||||
|
||||
/// Set the content size of the window.
|
||||
pub fn resize(&mut self, size: Size<Pixels>) {
|
||||
self.platform_window.resize(size);
|
||||
}
|
||||
|
||||
/// Returns whether or not the window is currently fullscreen
|
||||
pub fn is_fullscreen(&self) -> bool {
|
||||
self.platform_window.is_fullscreen()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue