@@ -222,6 +222,8 @@ def __init__(self, params: TViewParams):
222222 ]
223223
224224
225+
226+ SIDEBAR_WIDTH = 250 # width of the sidebar menu in home screen
225227class HomeScreen (TView , UserControl ):
226228 """The home screen"""
227229
@@ -347,21 +349,19 @@ def build(self):
347349 ),
348350 height = dimens .FOOTER_HEIGHT ,
349351 )
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+ ),
362362 )
363363 self .side_bar = Container (
364- col = { "xs" : 4 , "md" : 3 , "lg" : 2 } ,
364+ width = SIDEBAR_WIDTH ,
365365 padding = padding .only (top = dimens .SPACE_XL ),
366366 content = Column (
367367 controls = [
@@ -384,7 +384,7 @@ def build(self):
384384 self .home_screen_view = Container (
385385 Column (
386386 [
387- ResponsiveRow (
387+ Row (
388388 controls = [
389389 self .side_bar ,
390390 self .main_body ,
@@ -443,6 +443,7 @@ def on_window_resized_listener(self, width, height):
443443 self .action_bar .height + self .footer .height + 50
444444 )
445445 self .destination_content_container .height = DESTINATION_CONTENT_PERCENT_HEIGHT
446+ self .main_body .width = self .page_width - SIDEBAR_WIDTH
446447 self .update_self ()
447448
448449 def will_unmount (self ):
0 commit comments