Restore desktop pane widths and clamp ultrawide drags

This commit is contained in:
omar committed 2026-11-26 23:13:42 +03:00
1 parent 73c73d5cbc
commit 5b508e70e6
6 files changed
+60 -4

No files matched your search

+3 -2
View File
@@ -690,7 +690,8 @@ export component ShellScreen inherits Rectangle {
property <length> sidebar-width <=> ShellBridge.sidebar-width;
property <length> server-width <=> ShellBridge.server-width;
property <length> actual-sidebar: desktop ? min(clamp(sidebar-width, 62px, 420px), max(62px,self.width - 515px)) : 0px;
property <length> actual-server: desktop ? min(max(220px, server-width),max(220px,self.width - actual-sidebar - 295px)) : min(300px,self.width * 0.4);
property <length> max-server-width: min(1600px,max(220px,self.width - actual-sidebar - 295px));
property <length> actual-server: desktop ? clamp(server-width,220px,max-server-width) : min(300px,self.width * 0.4);
property <length> main-width: max(0px, self.width - actual-sidebar);
property <length> detail-width: max(0px, main-width - (root.desktop-tree || (!compact && ShellBridge.destination == 0) ? actual-server : 0px));
property <bool> desktop-tree: desktop && (ShellBridge.destination == 0 || (ShellBridge.destination == 1 && ShellBridge.tree.length > 0));
@@ -873,7 +874,7 @@ export component ShellScreen inherits Rectangle {
x: root.actual-sidebar + root.actual-server - 4.5px; y: 44px; width: 9px; height: max(0px, root.height - self.y);
background: split2.pressed ? Theme.tint.with-alpha(0.5) : transparent;
accessible-role: slider; accessible-label: ShellBridge.label-resize;
split2 := TouchArea { mouse-cursor: ew-resize; moved => { if self.pressed { root.server-width = clamp(root.actual-server + self.mouse-x - self.pressed-x,220px,max(220px,root.width - root.actual-sidebar - 295px)); } } pointer-event(e) => { if e.kind == PointerEventKind.up { ShellBridge.resized(root.sidebar-width/1px,root.server-width/1px); } } }
split2 := TouchArea { mouse-cursor: ew-resize; moved => { if self.pressed { root.server-width = clamp(root.actual-server + self.mouse-x - self.pressed-x,220px,root.max-server-width); } } pointer-event(e) => { if e.kind == PointerEventKind.up { ShellBridge.resized(root.sidebar-width/1px,root.server-width/1px); } } }
}
if ShellBridge.fullscreen-stream != "": Rectangle {
background: Theme.contrast;