feat(workspace): add option for moving the tab close button to the left
This commit is contained in:
parent
6793d4b6b8
commit
4efcf492ee
4 changed files with 107 additions and 72 deletions
|
@ -33,11 +33,30 @@ use theme::Theme;
|
|||
#[derive(Deserialize)]
|
||||
pub struct ItemSettings {
|
||||
pub git_status: bool,
|
||||
pub close_position: ClosePosition,
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum ClosePosition {
|
||||
Left,
|
||||
#[default]
|
||||
Right,
|
||||
}
|
||||
|
||||
impl ClosePosition {
|
||||
pub fn right(&self) -> bool {
|
||||
match self {
|
||||
ClosePosition::Left => false,
|
||||
ClosePosition::Right => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct ItemSettingsContent {
|
||||
git_status: Option<bool>,
|
||||
close_position: Option<ClosePosition>,
|
||||
}
|
||||
|
||||
impl Setting for ItemSettings {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue