@@ -653,15 +653,10 @@ def onCreate(self):
653653 screen .set_size (lv .pct (100 ), lv .pct (100 ))
654654 screen .set_style_pad_all (5 , 0 )
655655
656- # Title
657- title = lv .label (screen )
658- title .set_text ("Camera Settings" )
659- title .align (lv .ALIGN .TOP_MID , 0 , 5 )
660-
661656 # Create tabview
662657 tabview = lv .tabview (screen )
663- tabview .set_size ( lv . pct ( 100 ), lv . pct ( 82 ))
664- tabview .align (lv .ALIGN . TOP_MID , 0 , 30 )
658+ tabview .set_tab_bar_size ( mpos . ui . pct_of_display_height ( 10 ))
659+ tabview .set_size (lv .pct ( 100 ), mpos . ui . pct_of_display_height ( 85 ) )
665660
666661 # Create Basic tab (always)
667662 basic_tab = tabview .add_tab ("Basic" )
@@ -677,21 +672,22 @@ def onCreate(self):
677672
678673 # Save/Cancel buttons at bottom
679674 button_cont = lv .obj (screen )
680- button_cont .set_size (lv .pct (100 ), 50 )
675+ button_cont .set_size (lv .pct (100 ), mpos .ui .pct_of_display_height (15 ))
676+ button_cont .remove_flag (lv .obj .FLAG .SCROLLABLE )
681677 button_cont .align (lv .ALIGN .BOTTOM_MID , 0 , 0 )
682678 button_cont .set_style_border_width (0 , 0 )
683679 button_cont .set_style_bg_opa (0 , 0 )
684680
685681 save_button = lv .button (button_cont )
686- save_button .set_size (100 , 40 )
682+ save_button .set_size (100 , mpos . ui . pct_of_display_height ( 14 ) )
687683 save_button .align (lv .ALIGN .CENTER , - 60 , 0 )
688684 save_button .add_event_cb (lambda e : self .save_and_close (), lv .EVENT .CLICKED , None )
689685 save_label = lv .label (save_button )
690686 save_label .set_text ("Save" )
691687 save_label .center ()
692688
693689 cancel_button = lv .button (button_cont )
694- cancel_button .set_size (100 , 40 )
690+ cancel_button .set_size (100 , mpos . ui . pct_of_display_height ( 15 ) )
695691 cancel_button .align (lv .ALIGN .CENTER , 60 , 0 )
696692 cancel_button .add_event_cb (lambda e : self .finish (), lv .EVENT .CLICKED , None )
697693 cancel_label = lv .label (cancel_button )
@@ -703,7 +699,7 @@ def onCreate(self):
703699 def create_slider (self , parent , label_text , min_val , max_val , default_val , pref_key ):
704700 """Create slider with label showing current value."""
705701 cont = lv .obj (parent )
706- cont .set_size (lv .pct (95 ), 50 )
702+ cont .set_size (lv .pct (100 ), 60 )
707703 cont .set_style_pad_all (3 , 0 )
708704
709705 label = lv .label (cont )
@@ -714,7 +710,7 @@ def create_slider(self, parent, label_text, min_val, max_val, default_val, pref_
714710 slider .set_size (lv .pct (90 ), 15 )
715711 slider .set_range (min_val , max_val )
716712 slider .set_value (default_val , False )
717- slider .align (lv .ALIGN .BOTTOM_LEFT , 0 , 0 )
713+ slider .align (lv .ALIGN .BOTTOM_MID , 0 , - 10 )
718714
719715 def slider_changed (e ):
720716 val = slider .get_value ()
@@ -730,7 +726,7 @@ def slider_changed(e):
730726 def create_checkbox (self , parent , label_text , default_val , pref_key ):
731727 """Create checkbox with label."""
732728 cont = lv .obj (parent )
733- cont .set_size (lv .pct (95 ), 35 )
729+ cont .set_size (lv .pct (100 ), 35 )
734730 cont .set_style_pad_all (3 , 0 )
735731
736732 checkbox = lv .checkbox (cont )
@@ -747,7 +743,7 @@ def create_checkbox(self, parent, label_text, default_val, pref_key):
747743 def create_dropdown (self , parent , label_text , options , default_idx , pref_key ):
748744 """Create dropdown with label."""
749745 cont = lv .obj (parent )
750- cont .set_size (lv .pct (95 ), 60 )
746+ cont .set_size (lv .pct (100 ), 60 )
751747 cont .set_style_pad_all (3 , 0 )
752748
753749 label = lv .label (cont )
@@ -774,8 +770,8 @@ def create_dropdown(self, parent, label_text, options, default_idx, pref_key):
774770
775771 def create_basic_tab (self , tab , prefs ):
776772 """Create Basic settings tab."""
773+ tab .set_flex_flow (lv .FLEX_FLOW .COLUMN )
777774 tab .set_scrollbar_mode (lv .SCROLLBAR_MODE .AUTO )
778- tab .set_style_pad_all (5 , 0 )
779775
780776 # Resolution dropdown
781777 current_resolution = prefs .get_string ("resolution" , "320x240" )
@@ -827,7 +823,7 @@ def create_basic_tab(self, tab, prefs):
827823 def create_advanced_tab (self , tab , prefs ):
828824 """Create Advanced settings tab."""
829825 tab .set_scrollbar_mode (lv .SCROLLBAR_MODE .AUTO )
830- tab .set_style_pad_all ( 5 , 0 )
826+ tab .set_flex_flow ( lv . FLEX_FLOW . COLUMN )
831827
832828 # Auto Exposure Control (master switch)
833829 exposure_ctrl = prefs .get_bool ("exposure_ctrl" , True )
@@ -936,7 +932,7 @@ def whitebal_changed(e):
936932 def create_expert_tab (self , tab , prefs ):
937933 """Create Expert settings tab."""
938934 tab .set_scrollbar_mode (lv .SCROLLBAR_MODE .AUTO )
939- tab .set_style_pad_all ( 5 , 0 )
935+ tab .set_flex_flow ( lv . FLEX_FLOW . COLUMN )
940936
941937 # Note: Sensor detection would require camera access
942938 # For now, show sharpness/denoise with note
0 commit comments