Add "Reset Zoom" action and application menu item
This commit is contained in:
parent
4a5317b6e4
commit
e1a05d451f
4 changed files with 16 additions and 0 deletions
|
@ -43,6 +43,7 @@ actions!(
|
|||
OpenKeymap,
|
||||
IncreaseBufferFontSize,
|
||||
DecreaseBufferFontSize,
|
||||
ResetBufferFontSize,
|
||||
InstallCommandLineInterface,
|
||||
]
|
||||
);
|
||||
|
@ -72,6 +73,12 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
|
|||
cx.refresh_windows();
|
||||
});
|
||||
});
|
||||
cx.add_global_action(move |_: &ResetBufferFontSize, cx| {
|
||||
cx.update_global::<Settings, _, _>(|settings, cx| {
|
||||
settings.buffer_font_size = settings.default_buffer_font_size;
|
||||
cx.refresh_windows();
|
||||
});
|
||||
});
|
||||
cx.add_global_action(move |_: &InstallCommandLineInterface, cx| {
|
||||
cx.spawn(|cx| async move { install_cli(&cx).await.context("error creating CLI symlink") })
|
||||
.detach_and_log_err(cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue