@@ -133,15 +133,15 @@ def main_window(self) -> Any:
133
133
self .right_panel = self .right_column_view ()
134
134
if self .controller .autohide :
135
135
body = [
136
- (View . LEFT_WIDTH , self .left_panel ),
137
- ("weight" , 10 , self .center_panel ),
136
+ ("weight" , 20 , self .left_panel ),
137
+ ("weight" , 80 , self .center_panel ),
138
138
(0 , self .right_panel ),
139
139
]
140
140
else :
141
141
body = [
142
- (View . LEFT_WIDTH , self .left_panel ),
143
- ("weight" , 10 , self .center_panel ),
144
- (View . RIGHT_WIDTH , self .right_panel ),
142
+ ("weight" , 20 , self .left_panel ),
143
+ ("weight" , 65 , self .center_panel ),
144
+ ("weight" , 15 , self .right_panel ),
145
145
]
146
146
self .body = urwid .Columns (body , focus_column = 0 )
147
147
@@ -176,22 +176,16 @@ def main_window(self) -> Any:
176
176
def show_left_panel (self , * , visible : bool ) -> None :
177
177
if not self .controller .autohide :
178
178
return
179
- width = View .LEFT_WIDTH if visible else 0
180
- self .body .contents [0 ] = (
181
- self .left_panel ,
182
- self .body .options (width_type = "given" , width_amount = width ),
183
- )
179
+ option = ("weight" , 20 ) if visible else ("given" , 0 )
180
+ self .body .contents [0 ] = (self .left_panel , self .body .options (* option ))
184
181
if visible :
185
182
self .body .focus_position = 0
186
183
187
184
def show_right_panel (self , * , visible : bool ) -> None :
188
185
if not self .controller .autohide :
189
186
return
190
- width = View .RIGHT_WIDTH if visible else 0
191
- self .body .contents [2 ] = (
192
- self .right_panel ,
193
- self .body .options (width_type = "given" , width_amount = width ),
194
- )
187
+ option = ("weight" , 15 ) if visible else ("given" , 0 )
188
+ self .body .contents [2 ] = (self .right_panel , self .body .options (* option ))
195
189
if visible :
196
190
self .body .focus_position = 2
197
191
0 commit comments