@@ -222,6 +222,8 @@ def __init__(self, params: TViewParams):
222
222
]
223
223
224
224
225
+
226
+ SIDEBAR_WIDTH = 250 # width of the sidebar menu in home screen
225
227
class HomeScreen (TView , UserControl ):
226
228
"""The home screen"""
227
229
@@ -347,21 +349,19 @@ def build(self):
347
349
),
348
350
height = dimens .FOOTER_HEIGHT ,
349
351
)
350
- self .main_body = Column (
351
- col = {
352
- "xs" : 8 ,
353
- "md" : 9 ,
354
- "lg" : 10 ,
355
- },
356
- alignment = utils .START_ALIGNMENT ,
357
- horizontal_alignment = utils .START_ALIGNMENT ,
358
- controls = [
359
- self .action_bar ,
360
- self .destination_content_container ,
361
- ],
352
+ self .main_body = Container (
353
+ width = dimens .MIN_WINDOW_WIDTH - SIDEBAR_WIDTH ,
354
+ content = Column (
355
+ alignment = utils .START_ALIGNMENT ,
356
+ horizontal_alignment = utils .START_ALIGNMENT ,
357
+ controls = [
358
+ self .action_bar ,
359
+ self .destination_content_container ,
360
+ ],
361
+ ),
362
362
)
363
363
self .side_bar = Container (
364
- col = { "xs" : 4 , "md" : 3 , "lg" : 2 } ,
364
+ width = SIDEBAR_WIDTH ,
365
365
padding = padding .only (top = dimens .SPACE_XL ),
366
366
content = Column (
367
367
controls = [
@@ -384,7 +384,7 @@ def build(self):
384
384
self .home_screen_view = Container (
385
385
Column (
386
386
[
387
- ResponsiveRow (
387
+ Row (
388
388
controls = [
389
389
self .side_bar ,
390
390
self .main_body ,
@@ -443,6 +443,7 @@ def on_window_resized_listener(self, width, height):
443
443
self .action_bar .height + self .footer .height + 50
444
444
)
445
445
self .destination_content_container .height = DESTINATION_CONTENT_PERCENT_HEIGHT
446
+ self .main_body .width = self .page_width - SIDEBAR_WIDTH
446
447
self .update_self ()
447
448
448
449
def will_unmount (self ):
0 commit comments