Create the main application window
(cx: &mut App)
| 102 | // Alt + first letter (like Postman) |
| 103 | KeyBinding::new("alt-g", SetMethodGet, None), |
| 104 | KeyBinding::new("alt-p", SetMethodPost, None), |
| 105 | KeyBinding::new("alt-u", SetMethodPut, None), |
| 106 | KeyBinding::new("alt-d", SetMethodDelete, None), |
| 107 | KeyBinding::new("alt-a", SetMethodPatch, None), |
| 108 | KeyBinding::new("alt-h", SetMethodHead, None), |
| 109 | KeyBinding::new("alt-o", SetMethodOptions, None), |
| 110 | ]); |
| 111 | } |
| 112 | |
| 113 | /// Create the main application window |
| 114 | fn create_main_window(cx: &mut App) { |
| 115 | let initial_size = Size { |
| 116 | width: px(1280.0), |
| 117 | height: px(840.0), |
| 118 | }; |
| 119 | let window_bounds = WindowBounds::Windowed(Bounds::centered(None, initial_size, cx)); |
| 120 | |
| 121 | let options = WindowOptions { |
| 122 | window_bounds: Some(window_bounds), |
| 123 | window_min_size: Some(Size { |
| 124 | width: px(840.0), |
| 125 | height: px(560.0), |
| 126 | }), |
| 127 | titlebar: Some(gpui::TitlebarOptions { |
| 128 | title: Some("Setu".into()), |
| 129 | appears_transparent: false, |
| 130 | ..Default::default() |
| 131 | }), |
| 132 | ..Default::default() |