style: cargo fmt with the workspace tab policy (hard_tabs)
Whitespace only; the fork has no own rustfmt.toml so the Oak root policy applies.
This commit is contained in:
@@ -17,26 +17,26 @@ actions!(example, [Quit, CloseWindow]);
|
||||
/// - Sets up an app menu with the example name and a Quit action (cmd-q)
|
||||
/// - Configures the app to quit when all windows are closed
|
||||
pub fn init_example(cx: &mut App, name: impl Into<SharedString>) {
|
||||
// Bring the example window to the front
|
||||
cx.activate(true);
|
||||
// Bring the example window to the front
|
||||
cx.activate(true);
|
||||
|
||||
// Define the quit action...
|
||||
cx.on_action(|_: &Quit, cx| cx.quit());
|
||||
// ...then bind it to cmd+q
|
||||
cx.bind_keys([KeyBinding::new("cmd-q", Quit, None)]);
|
||||
// Define the quit action...
|
||||
cx.on_action(|_: &Quit, cx| cx.quit());
|
||||
// ...then bind it to cmd+q
|
||||
cx.bind_keys([KeyBinding::new("cmd-q", Quit, None)]);
|
||||
|
||||
// Set up an app menu with the example name and a Quit action (cmd-q)
|
||||
cx.set_menus(vec![Menu {
|
||||
name: name.into(),
|
||||
items: vec![MenuItem::action("Quit", Quit)],
|
||||
disabled: false,
|
||||
}]);
|
||||
// Set up an app menu with the example name and a Quit action (cmd-q)
|
||||
cx.set_menus(vec![Menu {
|
||||
name: name.into(),
|
||||
items: vec![MenuItem::action("Quit", Quit)],
|
||||
disabled: false,
|
||||
}]);
|
||||
|
||||
// Quit the app when all windows are closed
|
||||
cx.on_window_closed(|cx, _| {
|
||||
if cx.windows().is_empty() {
|
||||
cx.quit();
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
// Quit the app when all windows are closed
|
||||
cx.on_window_closed(|cx, _| {
|
||||
if cx.windows().is_empty() {
|
||||
cx.quit();
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user