style: professional dark theme refresh aligned with the design spec

- oak theme palette to a denser professional dark (near-black base,
  container/window surfaces, subtler secondary text).
- Dock tabs: selected tab solid accent with white text, hairline
  separators between panels.
- Timeline: green clip blocks, blue playhead, neutral track headers,
  brighter ruler labels, deep-green waveforms.
- Viewer: green timecode readout, solid-accent play button, chip-style
  fit/safe-margin buttons.
- Effect stack cards and node cards get rounded borders; spinbox
  values in amber per the design.
This commit is contained in:
2026-08-20 17:43:44 +08:00
parent 3870d6da06
commit dea33c713f
10 changed files with 167 additions and 64 deletions
+23 -10
View File
@@ -9,7 +9,8 @@
use crate::colors::DefaultColors;
use crate::{
App, AppContext, Axis, ClickEvent, Context, ElementId, EventEmitter, InteractiveElement,
IntoElement, Pixels, Point, Render, StatefulInteractiveElement, Styled, Window, div, px,
IntoElement, ParentElement, Pixels, Point, Render, StatefulInteractiveElement, Styled, Window,
div, px,
};
use super::{NodePath, path_key};
@@ -194,13 +195,21 @@ impl Render for SplitHandle {
cx.new(|_cx| SplitDragGhost { direction })
};
// The hitbox stays HITBOX-wide for grabbability, but the visible
// divider is a centered 1px hairline — the design separates panels
// with thin lines, not thick bars.
let line = div()
.flex_none()
.bg(colors.separator);
let mut root = div()
.id(ElementId::named_usize(
"dock-split-handle",
path_key(&self.path),
))
.flex_none()
.bg(colors.separator)
.flex()
.items_center()
.justify_center()
.on_click(cx.listener(move |this, event: &ClickEvent, _window, cx| {
if event.click_count() >= 2 {
this.reset(cx);
@@ -209,14 +218,18 @@ impl Render for SplitHandle {
// A horizontal split stacks children side by side, so its divider is
// a vertical bar and vice versa.
match direction {
Axis::Horizontal => {
root = root.w(px(Self::HITBOX.0)).h_full().cursor_col_resize();
}
Axis::Vertical => {
root = root.w_full().h(px(Self::HITBOX.0)).cursor_row_resize();
}
}
root = match direction {
Axis::Horizontal => root
.w(px(Self::HITBOX.0))
.h_full()
.cursor_col_resize()
.child(line.w(px(1.0)).h_full()),
Axis::Vertical => root
.w_full()
.h(px(Self::HITBOX.0))
.cursor_row_resize()
.child(line.w_full().h(px(1.0))),
};
root.on_drag(
SplitHandleDrag {
+24 -2
View File
@@ -244,6 +244,11 @@ impl Render for TabBar {
.h(px(26.0))
.w_full()
.overflow_hidden()
// The strip reads as raised chrome above the panel content, closed
// off by a hairline border (per the design's dense panel headers).
.bg(colors.container)
.border_b_1()
.border_color(colors.border)
.on_scroll_wheel(cx.listener(|this, event: &ScrollWheelEvent, _window, cx| {
let delta = match event.delta {
ScrollDelta::Pixels(delta) => delta.x.0,
@@ -278,6 +283,9 @@ impl Render for TabBar {
for (index, &panel) in self.tabs.iter().enumerate() {
let active = index == self.active;
// The hover fill for inactive tabs, hoisted out of the closure so
// the shared `colors` isn't moved (it is behind an `Arc`).
let inactive_hover = colors.background;
let title = self
.titles
.get(index)
@@ -310,12 +318,26 @@ impl Render for TabBar {
.whitespace_nowrap()
.cursor_pointer()
.text_sm()
// The active tab is the accent-filled chip of the design;
// inactive tabs sit flat on the strip with dimmed labels and
// surface on hover.
.bg(if active {
colors.selected
} else {
colors.background
colors.container
})
.text_color(if active {
colors.selected_text
} else {
colors.disabled
})
.hover(move |style| {
if active {
style
} else {
style.bg(inactive_hover)
}
})
.text_color(if active { colors.text } else { colors.disabled })
.on_click(cx.listener(move |this, _event: &ClickEvent, window, cx| {
this.activate(index, window, cx);
}))