update issues panel

This commit is contained in:
2026-08-21 09:16:04 +07:00
parent 8be65b7904
commit 052c30d12b
12 changed files with 200 additions and 102 deletions
+2
View File
@@ -949,7 +949,9 @@ impl DockArea {
.map(|view| view.entity_id());
}
}
impl EventEmitter<DockEvent> for DockArea {}
impl Render for DockArea {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let view = cx.entity().clone();
-10
View File
@@ -147,11 +147,6 @@ pub trait Panel: EventEmitter<PanelEvent> + Render + Focusable {
fn dump(&self, cx: &App) -> PanelState {
PanelState::new(self)
}
/// Whether the panel has inner padding when the panel is in the tabs layout, default is `true`.
fn inner_padding(&self, cx: &App) -> bool {
true
}
}
/// The PanelView trait used to define the panel view.
@@ -174,7 +169,6 @@ pub trait PanelView: 'static + Send + Sync {
fn view(&self) -> AnyView;
fn focus_handle(&self, cx: &App) -> FocusHandle;
fn dump(&self, cx: &App) -> PanelState;
fn inner_padding(&self, cx: &App) -> bool;
}
impl<T: Panel> PanelView for Entity<T> {
@@ -252,10 +246,6 @@ impl<T: Panel> PanelView for Entity<T> {
fn dump(&self, cx: &App) -> PanelState {
self.read(cx).dump(cx)
}
fn inner_padding(&self, cx: &App) -> bool {
self.read(cx).inner_padding(cx)
}
}
impl From<&dyn PanelView> for AnyView {
-8
View File
@@ -230,11 +230,6 @@ impl Panel for TabPanel {
}
state
}
fn inner_padding(&self, cx: &App) -> bool {
self.active_panel(cx)
.is_none_or(|panel| panel.inner_padding(cx))
}
}
/// State used to move the window when the title bar area is dragged.
@@ -965,8 +960,6 @@ impl TabPanel {
return Empty {}.into_any_element();
};
let has_inner_padding = self.inner_padding(cx);
let placeholder = self.drop_placeholder_animation;
let placeholder_animation_name = self.drop_placeholder_animation_name.clone();
@@ -974,7 +967,6 @@ impl TabPanel {
.id("active-panel")
.group("")
.flex_1()
.when(has_inner_padding, |this| this.pt_2())
.child(
div()
.id("tab-content")