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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user