Continue refining theme, update tabs & tab bar
This commit is contained in:
parent
0efd69c60f
commit
bfb1f5ecf0
7 changed files with 52 additions and 38 deletions
|
@ -108,13 +108,13 @@ impl Tab {
|
|||
let close_icon = || IconElement::new(Icon::Close).color(IconColor::Muted);
|
||||
|
||||
let (tab_bg, tab_hover_bg, tab_active_bg) = match self.current {
|
||||
true => (
|
||||
cx.theme().colors().ghost_element,
|
||||
false => (
|
||||
cx.theme().colors().tab_inactive,
|
||||
cx.theme().colors().ghost_element_hover,
|
||||
cx.theme().colors().ghost_element_active,
|
||||
),
|
||||
false => (
|
||||
cx.theme().colors().element,
|
||||
true => (
|
||||
cx.theme().colors().tab_active,
|
||||
cx.theme().colors().element_hover,
|
||||
cx.theme().colors().element_active,
|
||||
),
|
||||
|
@ -127,7 +127,7 @@ impl Tab {
|
|||
div()
|
||||
.id(self.id.clone())
|
||||
.on_drag(move |_view, cx| cx.build_view(|cx| drag_state.clone()))
|
||||
.drag_over::<TabDragState>(|d| d.bg(black()))
|
||||
.drag_over::<TabDragState>(|d| d.bg(cx.theme().colors().element_drop_target))
|
||||
.on_drop(|_view, state: View<TabDragState>, cx| {
|
||||
dbg!(state.read(cx));
|
||||
})
|
||||
|
@ -144,7 +144,7 @@ impl Tab {
|
|||
.px_1()
|
||||
.flex()
|
||||
.items_center()
|
||||
.gap_1()
|
||||
.gap_1p5()
|
||||
.children(has_fs_conflict.then(|| {
|
||||
IconElement::new(Icon::ExclamationTriangle)
|
||||
.size(crate::IconSize::Small)
|
||||
|
|
|
@ -27,6 +27,7 @@ impl TabBar {
|
|||
let (can_navigate_back, can_navigate_forward) = self.can_navigate;
|
||||
|
||||
div()
|
||||
.group("tab_bar")
|
||||
.id(self.id.clone())
|
||||
.w_full()
|
||||
.flex()
|
||||
|
@ -34,6 +35,7 @@ impl TabBar {
|
|||
// Left Side
|
||||
.child(
|
||||
div()
|
||||
.relative()
|
||||
.px_1()
|
||||
.flex()
|
||||
.flex_none()
|
||||
|
@ -41,6 +43,7 @@ impl TabBar {
|
|||
// Nav Buttons
|
||||
.child(
|
||||
div()
|
||||
.right_0()
|
||||
.flex()
|
||||
.items_center()
|
||||
.gap_px()
|
||||
|
@ -67,10 +70,15 @@ impl TabBar {
|
|||
// Right Side
|
||||
.child(
|
||||
div()
|
||||
// We only use absolute here since we don't
|
||||
// have opacity or `hidden()` yet
|
||||
.absolute()
|
||||
.neg_top_7()
|
||||
.px_1()
|
||||
.flex()
|
||||
.flex_none()
|
||||
.gap_2()
|
||||
.group_hover("tab_bar", |this| this.top_0())
|
||||
// Nav Buttons
|
||||
.child(
|
||||
div()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue