feat: add support for multi-themes (#210)

* chore: update deps

* wip

* add themes

* add matrix theme

* add flexoki and spaceduck themes

* .

* simple theme change function

* .

* respect shadow and radius settings

* add rose pine themes

* toggle theme
This commit is contained in:
reya
2025-12-26 08:20:18 +07:00
committed by GitHub
parent 5b7780ec9b
commit 34e026751b
49 changed files with 4349 additions and 2743 deletions

View File

@@ -309,7 +309,7 @@ impl DockItem {
pub(crate) fn focus_tab_panel(&self, window: &mut Window, cx: &mut App) {
if let DockItem::Tabs { view, .. } = self {
window.focus(&view.read(cx).focus_handle(cx));
window.focus(&view.read(cx).focus_handle(cx), cx);
}
}
}

View File

@@ -53,9 +53,9 @@ impl Render for DragPanel {
.justify_center()
.overflow_hidden()
.whitespace_nowrap()
.rounded(cx.theme().radius)
.rounded(cx.theme().radius_lg)
.text_xs()
.shadow_lg()
.when(cx.theme().shadow, |this| this.shadow_lg())
.bg(cx.theme().background)
.text_color(cx.theme().text_accent)
.child(self.panel.title(cx))
@@ -651,8 +651,8 @@ impl TabPanel {
.child(
div()
.size_full()
.rounded_xl()
.shadow_sm()
.rounded(cx.theme().radius_lg)
.when(cx.theme().shadow, |this| this.shadow_sm())
.when(cx.theme().mode.is_dark(), |this| this.shadow_lg())
.bg(cx.theme().panel_background)
.overflow_hidden()
@@ -671,7 +671,7 @@ impl TabPanel {
.p_1()
.child(
div()
.rounded_xl()
.rounded(cx.theme().radius_lg)
.border_1()
.border_color(cx.theme().element_disabled)
.bg(cx.theme().drop_target_background)
@@ -898,7 +898,7 @@ impl TabPanel {
fn focus_active_panel(&self, window: &mut Window, cx: &mut Context<Self>) {
if let Some(active_panel) = self.active_panel(cx) {
window.focus(&active_panel.focus_handle(cx));
window.focus(&active_panel.focus_handle(cx), cx);
}
}