File tree Expand file tree Collapse file tree
frontends/rioterm/src/layout Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -908,12 +908,21 @@ impl<T: rio_backend::event::EventListener> ContextGrid<T> {
908908 let is_multi_panel = self . inner . len ( ) > 1 ;
909909
910910 for item in self . inner . values_mut ( ) {
911- let [ abs_x, abs_y, width, height] = item. layout_rect ;
911+ // Single panel: ignore Taffy panel margin offset, use full available area
912+ let [ abs_x, abs_y, width, height] = if is_multi_panel {
913+ item. layout_rect
914+ } else {
915+ [
916+ 0.0 ,
917+ 0.0 ,
918+ self . width - self . scaled_margin . left - self . scaled_margin . right ,
919+ self . height - self . scaled_margin . top - self . scaled_margin . bottom ,
920+ ]
921+ } ;
912922
913923 let x = ( abs_x + self . scaled_margin . left ) / scale;
914924 let y = ( abs_y + self . scaled_margin . top ) / scale;
915925
916- // Clear margin since Taffy layout already accounts for spacing
917926 item. val . dimension . margin = Margin :: all ( 0.0 ) ;
918927 item. val . dimension . update_width ( width) ;
919928 item. val . dimension . update_height ( height) ;
You can’t perform that action at this time.
0 commit comments