mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 11:28:30 +08:00
Desktop: Hook up native window controls (#3161)
* Implement window controls * Fix drag target size * Maximize with drag area double click
This commit is contained in:
@@ -164,6 +164,11 @@ impl WinitApp {
|
||||
window.set_minimized(minimized);
|
||||
}
|
||||
}
|
||||
DesktopFrontendMessage::DragWindow => {
|
||||
if let Some(window) = &self.window {
|
||||
let _ = window.drag_window();
|
||||
}
|
||||
}
|
||||
DesktopFrontendMessage::CloseWindow => {
|
||||
let _ = self.event_loop_proxy.send_event(CustomEvent::CloseWindow);
|
||||
}
|
||||
@@ -271,7 +276,9 @@ impl ApplicationHandler<CustomEvent> for WinitApp {
|
||||
let mut window = Window::default_attributes()
|
||||
.with_title(APP_NAME)
|
||||
.with_min_inner_size(winit::dpi::LogicalSize::new(400, 300))
|
||||
.with_inner_size(winit::dpi::LogicalSize::new(1200, 800));
|
||||
.with_inner_size(winit::dpi::LogicalSize::new(1200, 800))
|
||||
.with_decorations(false)
|
||||
.with_resizable(true);
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user