Added theme and dock anchor saving :D
This commit is contained in:
parent
5487f99ac7
commit
e7b6d1befe
9 changed files with 111 additions and 19 deletions
|
@ -35,16 +35,23 @@ pub fn init(cx: &mut MutableAppContext) {
|
|||
cx.add_action(Dock::move_dock);
|
||||
cx.add_action(
|
||||
|workspace: &mut Workspace, _: &AnchorDockRight, cx: &mut ViewContext<Workspace>| {
|
||||
settings::settings_file::write_setting("default_dock_anchor", "right".to_string(), cx);
|
||||
Dock::move_dock(workspace, &MoveDock(DockAnchor::Right), cx)
|
||||
},
|
||||
);
|
||||
cx.add_action(
|
||||
|workspace: &mut Workspace, _: &AnchorDockBottom, cx: &mut ViewContext<Workspace>| {
|
||||
settings::settings_file::write_setting("default_dock_anchor", "bottom".to_string(), cx);
|
||||
Dock::move_dock(workspace, &MoveDock(DockAnchor::Bottom), cx)
|
||||
},
|
||||
);
|
||||
cx.add_action(
|
||||
|workspace: &mut Workspace, _: &ExpandDock, cx: &mut ViewContext<Workspace>| {
|
||||
settings::settings_file::write_setting(
|
||||
"default_dock_anchor",
|
||||
"expanded".to_string(),
|
||||
cx,
|
||||
);
|
||||
Dock::move_dock(workspace, &MoveDock(DockAnchor::Expanded), cx)
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue