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 background: Color,
|
||||
pub titlebar: Titlebar,
|
||||
pub focused_active_tab: Tab,
|
||||
pub focused_inactive_tab: Tab,
|
||||
pub unfocused_active_tab: Tab,
|
||||
pub unfocused_inactive_tab: Tab,
|
||||
pub active_pane_active_tab: Tab,
|
||||
pub active_pane_inactive_tab: Tab,
|
||||
pub inactive_pane_active_tab: Tab,
|
||||
pub inactive_pane_inactive_tab: Tab,
|
||||
pub pane_button: Interactive<IconButton>,
|
||||
pub pane_divider: Border,
|
||||
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({
|
||||
let mut tab_style = match (is_pane_active, is_tab_active) {
|
||||
(true, true) => theme.workspace.focused_active_tab.clone(),
|
||||
(true, false) => theme.workspace.focused_inactive_tab.clone(),
|
||||
(false, true) => theme.workspace.unfocused_active_tab.clone(),
|
||||
(false, false) => theme.workspace.unfocused_inactive_tab.clone(),
|
||||
(true, true) => theme.workspace.active_pane_active_tab.clone(),
|
||||
(true, false) => theme.workspace.active_pane_inactive_tab.clone(),
|
||||
(false, true) => theme.workspace.inactive_pane_active_tab.clone(),
|
||||
(false, false) => theme.workspace.inactive_pane_inactive_tab.clone(),
|
||||
};
|
||||
let title = item.tab_content(detail, &tab_style, cx);
|
||||
|
||||
|
@ -997,16 +997,16 @@ impl Pane {
|
|||
}
|
||||
|
||||
let filler_style = if is_pane_active {
|
||||
&theme.workspace.focused_inactive_tab
|
||||
&theme.workspace.active_pane_inactive_tab
|
||||
} else {
|
||||
&theme.workspace.unfocused_inactive_tab
|
||||
&theme.workspace.inactive_pane_inactive_tab
|
||||
};
|
||||
|
||||
row.add_child(
|
||||
Empty::new()
|
||||
.contained()
|
||||
.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)
|
||||
.named("filler"),
|
||||
);
|
||||
|
@ -1115,7 +1115,7 @@ impl View for Pane {
|
|||
cx.global::<Settings>()
|
||||
.theme
|
||||
.workspace
|
||||
.focused_active_tab
|
||||
.active_pane_active_tab
|
||||
.height,
|
||||
)
|
||||
.boxed()
|
||||
|
@ -1130,7 +1130,7 @@ impl View for Pane {
|
|||
MouseEventHandler::new::<EmptyPane, _, _>(0, cx, |_, _| {
|
||||
Empty::new()
|
||||
.contained()
|
||||
.with_background_color(theme.editor.background)
|
||||
.with_background_color(theme.workspace.background)
|
||||
.boxed()
|
||||
})
|
||||
.on_down(MouseButton::Left, |_, cx| {
|
||||
|
|
|
@ -14,7 +14,7 @@ export function workspaceBackground(theme: Theme) {
|
|||
}
|
||||
|
||||
export default function workspace(theme: Theme) {
|
||||
const focusedInactiveTab = {
|
||||
const activePaneInactiveTab = {
|
||||
height: 32,
|
||||
background: workspaceBackground(theme),
|
||||
iconClose: iconColor(theme, "muted"),
|
||||
|
@ -39,24 +39,24 @@ export default function workspace(theme: Theme) {
|
|||
}
|
||||
};
|
||||
|
||||
const focusedActiveTab = {
|
||||
...focusedInactiveTab,
|
||||
const activePaneActiveTab = {
|
||||
...activePaneInactiveTab,
|
||||
background: backgroundColor(theme, 500),
|
||||
text: text(theme, "sans", "active", { size: "sm" }),
|
||||
border: {
|
||||
...focusedInactiveTab.border,
|
||||
...activePaneInactiveTab.border,
|
||||
bottom: false,
|
||||
},
|
||||
};
|
||||
|
||||
const unfocusedInactiveTab = {
|
||||
...focusedInactiveTab,
|
||||
const inactivePaneInactiveTab = {
|
||||
...activePaneInactiveTab,
|
||||
background: backgroundColor(theme, 100),
|
||||
text: text(theme, "sans", "placeholder", { size: "sm" }),
|
||||
};
|
||||
|
||||
const unfocusedActiveTab = {
|
||||
...focusedInactiveTab,
|
||||
const inactivePaneActiveTab = {
|
||||
...activePaneInactiveTab,
|
||||
text: text(theme, "sans", "placeholder", { size: "sm" }),
|
||||
}
|
||||
|
||||
|
@ -74,17 +74,17 @@ export default function workspace(theme: Theme) {
|
|||
},
|
||||
leaderBorderOpacity: 0.7,
|
||||
leaderBorderWidth: 2.0,
|
||||
focusedActiveTab,
|
||||
focusedInactiveTab,
|
||||
unfocusedActiveTab,
|
||||
unfocusedInactiveTab,
|
||||
activePaneActiveTab,
|
||||
activePaneInactiveTab,
|
||||
inactivePaneActiveTab,
|
||||
inactivePaneInactiveTab,
|
||||
paneButton: {
|
||||
color: iconColor(theme, "secondary"),
|
||||
border: {
|
||||
...focusedActiveTab.border,
|
||||
...activePaneActiveTab.border,
|
||||
},
|
||||
iconWidth: 12,
|
||||
buttonWidth: focusedActiveTab.height,
|
||||
buttonWidth: activePaneActiveTab.height,
|
||||
hover: {
|
||||
color: iconColor(theme, "active"),
|
||||
background: backgroundColor(theme, 300),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue