From 18a0549c7e95bde647f51cf55f4fff8b30b5762b Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 4 Feb 2025 15:08:16 +0800 Subject: [PATCH] . --- crates/ui/src/dock/tab_panel.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/ui/src/dock/tab_panel.rs b/crates/ui/src/dock/tab_panel.rs index d351bc46..8c1d0ca7 100644 --- a/crates/ui/src/dock/tab_panel.rs +++ b/crates/ui/src/dock/tab_panel.rs @@ -4,7 +4,7 @@ use gpui::{ div, prelude::FluentBuilder, px, rems, App, AppContext, Context, Corner, DefiniteLength, DismissEvent, DragMoveEvent, Empty, Entity, EventEmitter, FocusHandle, Focusable, InteractiveElement as _, IntoElement, ParentElement, Pixels, Render, ScrollHandle, - SharedString, StatefulInteractiveElement, Styled, WeakEntity, Window, + SharedString, StatefulInteractiveElement, StyleRefinement, Styled, WeakEntity, Window, }; use rust_i18n::t; @@ -14,7 +14,7 @@ use crate::{ h_flex, popup_menu::{PopupMenu, PopupMenuExt}, tab::{Tab, TabBar}, - v_flex, ActiveTheme, AxisExt, IconName, Placement, Selectable, Sizable, + v_flex, ActiveTheme, AxisExt, IconName, Placement, Selectable, Sizable, StyledExt as _, }; use super::{ @@ -767,7 +767,11 @@ impl TabPanel { .overflow_y_scroll() .overflow_x_hidden() .flex_1() - .child(active_panel.view()) + .child( + active_panel + .view() + .cached(StyleRefinement::default().v_flex().size_full()), + ) .when(state.droppable, |this| { this.on_drag_move(cx.listener(Self::on_panel_drag_move)) .child(