T33: the sessions and right columns resize by a drag on their border toward the terminal, 160 to 960 pixels, kept in the settings once a drag rests; Ely 5c2822c's resizable ShellColumn, whose handle occludes the header so the drag moves no window, and Ely 005faef's handle line, a filled hairline, since gpui paints a border no wider than half its box
CI / platforms (ubuntu-24.04) (push) Successful in 1m50s
CI / platforms (windows-latest) (push) Successful in 1m49s
CI / macos (push) Successful in 13m17s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-16 20:17:13 -04:00
1 parent 6336c05528
commit da55942050
8 files changed
+111 -11

No files matched your search

+10 -6
View File
@@ -3,7 +3,7 @@ use ely_gpui_component::{
lists::List,
primitives::{FocusScope, IconName},
shell::{ColumnShell, ResizeBorder, ShellColumn},
theme::{ActiveTheme, ControlSize},
theme::ControlSize,
typography::Caption,
};
use gpui::{
@@ -26,6 +26,10 @@ use crate::{
},
};
mod widths;
use widths::{Dragged, Side};
actions!(
elyterminal,
[
@@ -88,6 +92,8 @@ pub struct Workspace {
git: Entity<GitPanel>,
/// What the window shows of the desktop, and the blur behind it.
background: Blur,
/// Column widths a drag shows before the settings hold them.
dragged: Dragged,
_settings: Subscription,
_acted: Subscription,
}
@@ -114,6 +120,7 @@ impl Workspace {
files: cx.new(|_| Files::new(launch.cwd.clone())),
git,
background: Blur::new(window, SettingsStore::get(cx)),
dragged: Dragged::default(),
_settings: cx.observe_global_in::<SettingsStore>(window, |this, window, cx| {
this.background.follow(window, SettingsStore::get(cx));
cx.notify();
@@ -339,7 +346,6 @@ impl Render for Workspace {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
self.background.fit(window);
let settings = SettingsStore::get(cx);
let width = cx.theme().sidebar_width(false);
let workspace = cx.entity();
let tip =
|shown: bool, what: &str| format!("{} {what}", if shown { "Hide" } else { "Show" });
@@ -393,8 +399,7 @@ impl Render for Workspace {
workspace.update(cx, |this, cx| this.new_session(window, cx))
});
shell = shell.column(
ShellColumn::new("sessions")
.width(width)
self.side_column(Side::Sessions, cx)
.leading(left)
.action(new)
.child(
@@ -436,8 +441,7 @@ impl Render for Workspace {
// Git's list draws every row, so terminal output must not redraw it.
let fill = || StyleRefinement::default().size_full();
shell = shell.column(terminal).column(
ShellColumn::new("panel")
.width(width)
self.side_column(Side::Panel, cx)
.action(end)
// Below the title bar, clear of Windows' caption buttons.
.child(div().flex().justify_center().px_2().pt_2().child(switch))