mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +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:
@@ -8,5 +8,6 @@ pub enum AppWindowMessage {
|
||||
AppWindowMinimize,
|
||||
AppWindowMaximize,
|
||||
AppWindowUpdatePlatform { platform: AppWindowPlatform },
|
||||
AppWindowDrag,
|
||||
AppWindowClose,
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@ impl MessageHandler<AppWindowMessage, ()> for AppWindowMessageHandler {
|
||||
self.platform = platform;
|
||||
responses.add(FrontendMessage::UpdatePlatform { platform: self.platform });
|
||||
}
|
||||
AppWindowMessage::AppWindowDrag => {
|
||||
responses.add(FrontendMessage::DragWindow);
|
||||
}
|
||||
AppWindowMessage::AppWindowClose => {
|
||||
responses.add(FrontendMessage::CloseWindow);
|
||||
}
|
||||
|
||||
@@ -343,6 +343,7 @@ pub enum FrontendMessage {
|
||||
maximized: bool,
|
||||
minimized: bool,
|
||||
},
|
||||
DragWindow,
|
||||
CloseWindow,
|
||||
UpdateViewportHolePunch {
|
||||
active: bool,
|
||||
|
||||
Reference in New Issue
Block a user