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

+14
View File
@@ -75,6 +75,9 @@ pub struct Settings {
pub show_sessions: bool,
pub show_panel: bool,
pub panel: PanelTab,
/// The sessions and right columns' widths, in pixels, as their borders were dragged.
pub sessions_width: f32,
pub panel_width: f32,
/// The main window's size, unmaximized, in pixels.
pub window_width: f32,
pub window_height: f32,
@@ -103,6 +106,8 @@ impl Default for Settings {
show_sessions: true,
show_panel: true,
panel: PanelTab::Git,
sessions_width: 240.0,
panel_width: 240.0,
window_width: 1200.0,
window_height: 760.0,
}
@@ -114,6 +119,7 @@ pub const LINE_HEIGHT: RangeInclusive<f32> = 1.0..=2.0;
pub const OPACITY: RangeInclusive<f32> = 0.3..=1.0;
pub const PADDING: RangeInclusive<f32> = 0.0..=64.0;
pub const SCROLLBACK: RangeInclusive<u32> = 0..=100_000;
pub const COLUMN: RangeInclusive<f32> = 160.0..=960.0;
pub const WINDOW: RangeInclusive<f32> = 100.0..=16384.0;
impl Settings {
@@ -125,6 +131,8 @@ impl Settings {
within("padding_x", self.padding_x, &PADDING)?;
within("padding_y", self.padding_y, &PADDING)?;
within("scrollback", self.scrollback, &SCROLLBACK)?;
within("sessions_width", self.sessions_width, &COLUMN)?;
within("panel_width", self.panel_width, &COLUMN)?;
within("window_width", self.window_width, &WINDOW)?;
within("window_height", self.window_height, &WINDOW)?;
for (field, id) in [
@@ -242,6 +250,12 @@ mod tests {
error.to_string(),
"window_width is 50, outside 100 to 16384"
);
let settings = Settings {
panel_width: 1000.0,
..Settings::default()
};
let error = settings.validate().expect_err("too wide");
assert_eq!(error.to_string(), "panel_width is 1000, outside 160 to 960");
}
#[test]