Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .theme-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@
"description": "Progress bar background color.",
"type": ["string", "null"]
},
"resizable.border": {
"description": "The hairline a resize handle draws at rest. Falls back to `border`.",
"type": ["string", "null"]
},
"ring": {
"description": "Used for focus ring.",
"type": ["string", "null"]
Expand Down
8 changes: 4 additions & 4 deletions crates/base/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ pub use progress::{Progress, ProgressIndicator, ProgressTrack};
pub use radio::{Radio, RadioStyles};
pub use radio_group::RadioGroup;
pub use reduce_motion::apply_system_reduce_motion;
#[doc(hidden)]
pub use resizable::PANEL_MIN_SIZE;
pub use resizable::{
HandleEdge, ResizablePanel, ResizablePanelEvent, ResizablePanelGroup, ResizableState,
ResizeHandleContext, ResizeHandleRenderer, ResizeHandleState, h_resizable, resizable_panel,
v_resizable,
ResizeHandle, ResizeHandleContext, ResizeHandleRenderer, ResizeHandleState, h_resizable,
resizable_panel, resize_handle, v_resizable,
};
#[doc(hidden)]
pub use resizable::{PANEL_MIN_SIZE, resize_handle};
pub use root::{Root, RootPlugin};
pub use scroll_bounce::{ScrollBounce, ScrollBounceMotion};
pub use scrollable_mask::ScrollableMask;
Expand Down
6 changes: 4 additions & 2 deletions crates/base/src/resizable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ use gpui::{
mod panel;
mod resize_handle;
pub use panel::*;
#[doc(hidden)]
pub use resize_handle::*;
pub use resize_handle::{
HandleEdge, ResizeHandle, ResizeHandleContext, ResizeHandleRenderer, ResizeHandleState,
resize_handle,
};

#[doc(hidden)]
pub const PANEL_MIN_SIZE: Pixels = px(100.);
Expand Down
11 changes: 4 additions & 7 deletions crates/base/src/resizable/panel.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
use std::{
ops::{Deref, Range},
rc::Rc,
};
use std::{ops::Range, rc::Rc};

use gpui::{
Along, AnyElement, App, AppContext, Axis, Bounds, Context, Element, ElementId, Empty, Entity,
EventEmitter, InteractiveElement as _, IntoElement, IsZero as _, MouseMoveEvent, MouseUpEvent,
ParentElement, Pixels, Render, RenderOnce, Style, StyleRefinement, Styled, Window, div,
prelude::FluentBuilder,
ParentElement, Pixels, Render, RenderOnce, StatefulInteractiveElement as _, Style,
StyleRefinement, Styled, Window, div, prelude::FluentBuilder,
};

use crate::{AxisExt, ElementExt, StyledExt as _, h_flex, resizable::PANEL_MIN_SIZE, v_flex};
Expand Down Expand Up @@ -373,7 +370,7 @@ impl RenderOnce for ResizablePanel {
state.update(cx, |state, _| {
state.resizing_panel_ix = Some(ix);
});
cx.new(|_| drag_panel.deref().clone())
cx.new(|_| drag_panel.clone())
}),
)
})
Expand Down
Loading
Loading