Minor naming improvements and revert empty pane background color change
This commit is contained in:
parent
fb2fbf2ac7
commit
d6519ad280
4 changed files with 27 additions and 27 deletions
|
@ -38,10 +38,10 @@ pub struct Theme {
|
||||||
pub struct Workspace {
|
pub struct Workspace {
|
||||||
pub background: Color,
|
pub background: Color,
|
||||||
pub titlebar: Titlebar,
|
pub titlebar: Titlebar,
|
||||||
pub focused_active_tab: Tab,
|
pub active_pane_active_tab: Tab,
|
||||||
pub focused_inactive_tab: Tab,
|
pub active_pane_inactive_tab: Tab,
|
||||||
pub unfocused_active_tab: Tab,
|
pub inactive_pane_active_tab: Tab,
|
||||||
pub unfocused_inactive_tab: Tab,
|
pub inactive_pane_inactive_tab: Tab,
|
||||||
pub pane_button: Interactive<IconButton>,
|
pub pane_button: Interactive<IconButton>,
|
||||||
pub pane_divider: Border,
|
pub pane_divider: Border,
|
||||||
pub leader_border_opacity: f32,
|
pub leader_border_opacity: f32,
|
||||||
|
|
0
crates/workspace/src/drag_and_drop.rs
Normal file
0
crates/workspace/src/drag_and_drop.rs
Normal file
|
@ -880,10 +880,10 @@ impl Pane {
|
||||||
|
|
||||||
row.add_child({
|
row.add_child({
|
||||||
let mut tab_style = match (is_pane_active, is_tab_active) {
|
let mut tab_style = match (is_pane_active, is_tab_active) {
|
||||||
(true, true) => theme.workspace.focused_active_tab.clone(),
|
(true, true) => theme.workspace.active_pane_active_tab.clone(),
|
||||||
(true, false) => theme.workspace.focused_inactive_tab.clone(),
|
(true, false) => theme.workspace.active_pane_inactive_tab.clone(),
|
||||||
(false, true) => theme.workspace.unfocused_active_tab.clone(),
|
(false, true) => theme.workspace.inactive_pane_active_tab.clone(),
|
||||||
(false, false) => theme.workspace.unfocused_inactive_tab.clone(),
|
(false, false) => theme.workspace.inactive_pane_inactive_tab.clone(),
|
||||||
};
|
};
|
||||||
let title = item.tab_content(detail, &tab_style, cx);
|
let title = item.tab_content(detail, &tab_style, cx);
|
||||||
|
|
||||||
|
@ -997,16 +997,16 @@ impl Pane {
|
||||||
}
|
}
|
||||||
|
|
||||||
let filler_style = if is_pane_active {
|
let filler_style = if is_pane_active {
|
||||||
&theme.workspace.focused_inactive_tab
|
&theme.workspace.active_pane_inactive_tab
|
||||||
} else {
|
} else {
|
||||||
&theme.workspace.unfocused_inactive_tab
|
&theme.workspace.inactive_pane_inactive_tab
|
||||||
};
|
};
|
||||||
|
|
||||||
row.add_child(
|
row.add_child(
|
||||||
Empty::new()
|
Empty::new()
|
||||||
.contained()
|
.contained()
|
||||||
.with_style(filler_style.container)
|
.with_style(filler_style.container)
|
||||||
.with_border(theme.workspace.focused_active_tab.container.border)
|
.with_border(theme.workspace.active_pane_active_tab.container.border)
|
||||||
.flex(0., true)
|
.flex(0., true)
|
||||||
.named("filler"),
|
.named("filler"),
|
||||||
);
|
);
|
||||||
|
@ -1115,7 +1115,7 @@ impl View for Pane {
|
||||||
cx.global::<Settings>()
|
cx.global::<Settings>()
|
||||||
.theme
|
.theme
|
||||||
.workspace
|
.workspace
|
||||||
.focused_active_tab
|
.active_pane_active_tab
|
||||||
.height,
|
.height,
|
||||||
)
|
)
|
||||||
.boxed()
|
.boxed()
|
||||||
|
@ -1130,7 +1130,7 @@ impl View for Pane {
|
||||||
MouseEventHandler::new::<EmptyPane, _, _>(0, cx, |_, _| {
|
MouseEventHandler::new::<EmptyPane, _, _>(0, cx, |_, _| {
|
||||||
Empty::new()
|
Empty::new()
|
||||||
.contained()
|
.contained()
|
||||||
.with_background_color(theme.editor.background)
|
.with_background_color(theme.workspace.background)
|
||||||
.boxed()
|
.boxed()
|
||||||
})
|
})
|
||||||
.on_down(MouseButton::Left, |_, cx| {
|
.on_down(MouseButton::Left, |_, cx| {
|
||||||
|
|
|
@ -14,7 +14,7 @@ export function workspaceBackground(theme: Theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function workspace(theme: Theme) {
|
export default function workspace(theme: Theme) {
|
||||||
const focusedInactiveTab = {
|
const activePaneInactiveTab = {
|
||||||
height: 32,
|
height: 32,
|
||||||
background: workspaceBackground(theme),
|
background: workspaceBackground(theme),
|
||||||
iconClose: iconColor(theme, "muted"),
|
iconClose: iconColor(theme, "muted"),
|
||||||
|
@ -39,24 +39,24 @@ export default function workspace(theme: Theme) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const focusedActiveTab = {
|
const activePaneActiveTab = {
|
||||||
...focusedInactiveTab,
|
...activePaneInactiveTab,
|
||||||
background: backgroundColor(theme, 500),
|
background: backgroundColor(theme, 500),
|
||||||
text: text(theme, "sans", "active", { size: "sm" }),
|
text: text(theme, "sans", "active", { size: "sm" }),
|
||||||
border: {
|
border: {
|
||||||
...focusedInactiveTab.border,
|
...activePaneInactiveTab.border,
|
||||||
bottom: false,
|
bottom: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const unfocusedInactiveTab = {
|
const inactivePaneInactiveTab = {
|
||||||
...focusedInactiveTab,
|
...activePaneInactiveTab,
|
||||||
background: backgroundColor(theme, 100),
|
background: backgroundColor(theme, 100),
|
||||||
text: text(theme, "sans", "placeholder", { size: "sm" }),
|
text: text(theme, "sans", "placeholder", { size: "sm" }),
|
||||||
};
|
};
|
||||||
|
|
||||||
const unfocusedActiveTab = {
|
const inactivePaneActiveTab = {
|
||||||
...focusedInactiveTab,
|
...activePaneInactiveTab,
|
||||||
text: text(theme, "sans", "placeholder", { size: "sm" }),
|
text: text(theme, "sans", "placeholder", { size: "sm" }),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,17 +74,17 @@ export default function workspace(theme: Theme) {
|
||||||
},
|
},
|
||||||
leaderBorderOpacity: 0.7,
|
leaderBorderOpacity: 0.7,
|
||||||
leaderBorderWidth: 2.0,
|
leaderBorderWidth: 2.0,
|
||||||
focusedActiveTab,
|
activePaneActiveTab,
|
||||||
focusedInactiveTab,
|
activePaneInactiveTab,
|
||||||
unfocusedActiveTab,
|
inactivePaneActiveTab,
|
||||||
unfocusedInactiveTab,
|
inactivePaneInactiveTab,
|
||||||
paneButton: {
|
paneButton: {
|
||||||
color: iconColor(theme, "secondary"),
|
color: iconColor(theme, "secondary"),
|
||||||
border: {
|
border: {
|
||||||
...focusedActiveTab.border,
|
...activePaneActiveTab.border,
|
||||||
},
|
},
|
||||||
iconWidth: 12,
|
iconWidth: 12,
|
||||||
buttonWidth: focusedActiveTab.height,
|
buttonWidth: activePaneActiveTab.height,
|
||||||
hover: {
|
hover: {
|
||||||
color: iconColor(theme, "active"),
|
color: iconColor(theme, "active"),
|
||||||
background: backgroundColor(theme, 300),
|
background: backgroundColor(theme, 300),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue