1515
1616from app_state import AppState
1717
18- from flet import (
19- Column ,
20- Image ,
21- Row ,
22- UserControl ,
23- VerticalDivider ,
24- )
18+ from flet import Column , Container , Image , Row , UserControl , VerticalDivider , margin
2519
2620
2721class BaseView (UserControl ):
@@ -30,27 +24,35 @@ def __init__(self, state: AppState, image: str = "placeholder.png"):
3024 self .state = state
3125
3226 # configs
33- self .column_width = 600
27+ # self.column_width = 600
3428 # right part of the display, add content here.
35- self .right_view_header = Column (width = self .column_width , height = 120 , spacing = 30 )
29+ self .right_view_header = Column (
30+ spacing = 30
31+ ) # , width=self.column_width, height=120)
3632 self .right_view = Column (
37- alignment = "center" , width = self .column_width , height = 650 , scroll = "adaptive"
33+ alignment = "center" ,
34+ scroll = "adaptive" , # , width=self.column_width, height=650
3835 )
3936 # left part of the display: used for displaying the images
4037 self .left_view = Column (
41- width = self .column_width ,
38+ # width=self.column_width,
4239 controls = [Image (src = f"/imgs/{ image } " , height = 600 )],
4340 expand = True ,
4441 horizontal_alignment = "center" ,
4542 )
4643 # main view row
47- self .view = Row (
48- [
49- self .left_view ,
50- VerticalDivider (),
51- Column (expand = True , controls = [self .right_view_header , self .right_view ]),
52- ],
53- alignment = "spaceEvenly" ,
44+ self .view = Container (
45+ content = Row (
46+ [
47+ self .left_view ,
48+ VerticalDivider (),
49+ Column (
50+ expand = True , controls = [self .right_view_header , self .right_view ]
51+ ),
52+ ],
53+ alignment = "spaceEvenly" ,
54+ ),
55+ margin = margin .only (left = 10 , top = 0 , right = 50 , bottom = 5 ),
5456 )
5557
5658 def clear (
0 commit comments