@@ -9,7 +9,12 @@ use crate::state::MAX_CHANNELS;
99impl UltraLogApp {
1010 /// Render channel selection panel - fills available space
1111 pub fn render_channel_selection ( & mut self , ui : & mut egui:: Ui ) {
12- ui. heading ( "Channels" ) ;
12+ // Pre-compute scaled font sizes
13+ let font_14 = self . scaled_font ( 14.0 ) ;
14+ let font_16 = self . scaled_font ( 16.0 ) ;
15+ let font_18 = self . scaled_font ( 18.0 ) ;
16+
17+ ui. label ( egui:: RichText :: new ( "Channels" ) . heading ( ) . size ( font_18) ) ;
1318 ui. separator ( ) ;
1419
1520 // Get active tab info
@@ -31,7 +36,7 @@ impl UltraLogApp {
3136
3237 // Computed Channels button
3338 if ui
34- . button ( "+ Computed Channels" )
39+ . button ( egui :: RichText :: new ( "+ Computed Channels" ) . size ( font_14 ) )
3540 . on_hover_text ( "Create virtual channels from mathematical formulas" )
3641 . clicked ( )
3742 {
@@ -44,7 +49,7 @@ impl UltraLogApp {
4449 let mut search_text = current_search;
4550 let mut search_changed = false ;
4651 ui. horizontal ( |ui| {
47- ui. label ( "Search:" ) ;
52+ ui. label ( egui :: RichText :: new ( "Search:" ) . size ( font_14 ) ) ;
4853 let response = ui
4954 . add ( egui:: TextEdit :: singleline ( & mut search_text) . desired_width ( f32:: INFINITY ) ) ;
5055 search_changed = response. changed ( ) ;
@@ -58,10 +63,13 @@ impl UltraLogApp {
5863 ui. add_space ( 5.0 ) ;
5964
6065 // Channel count
61- ui. label ( format ! (
62- "Selected: {} / {} | Total: {}" ,
63- selected_count, MAX_CHANNELS , channel_count
64- ) ) ;
66+ ui. label (
67+ egui:: RichText :: new ( format ! (
68+ "Selected: {} / {} | Total: {}" ,
69+ selected_count, MAX_CHANNELS , channel_count
70+ ) )
71+ . size ( font_14) ,
72+ ) ;
6573
6674 ui. separator ( ) ;
6775
@@ -173,7 +181,8 @@ impl UltraLogApp {
173181 "📊 Channels with Data ({})" ,
174182 channels_with. len( )
175183 ) )
176- . strong ( ) ,
184+ . strong ( )
185+ . size ( font_16) ,
177186 )
178187 . default_open ( true )
179188 . show ( ui, |ui| {
@@ -203,7 +212,8 @@ impl UltraLogApp {
203212 "📭 Empty Channels ({})" ,
204213 channels_without. len( )
205214 ) )
206- . color ( egui:: Color32 :: GRAY ) ,
215+ . color ( egui:: Color32 :: GRAY )
216+ . size ( font_16) ,
207217 )
208218 . default_open ( false ) // Collapsed by default
209219 . show ( ui, |ui| {
@@ -234,15 +244,26 @@ impl UltraLogApp {
234244 ui. label (
235245 egui:: RichText :: new ( "Select a file to view channels" )
236246 . italics ( )
237- . color ( egui:: Color32 :: GRAY ) ,
247+ . color ( egui:: Color32 :: GRAY )
248+ . size ( font_16) ,
238249 ) ;
239250 } ) ;
240251 }
241252 }
242253
243254 /// Render selected channel cards
244255 pub fn render_selected_channels ( & mut self , ui : & mut egui:: Ui ) {
245- ui. heading ( "Selected Channels" ) ;
256+ // Pre-compute scaled font sizes
257+ let font_12 = self . scaled_font ( 12.0 ) ;
258+ let font_14 = self . scaled_font ( 14.0 ) ;
259+ let font_16 = self . scaled_font ( 16.0 ) ;
260+ let font_18 = self . scaled_font ( 18.0 ) ;
261+
262+ ui. label (
263+ egui:: RichText :: new ( "Selected Channels" )
264+ . heading ( )
265+ . size ( font_18) ,
266+ ) ;
246267 ui. separator ( ) ;
247268
248269 let use_normalization = self . field_normalization ;
@@ -391,7 +412,8 @@ impl UltraLogApp {
391412 ui. label (
392413 egui:: RichText :: new ( & card. display_name )
393414 . strong ( )
394- . color ( card. color ) ,
415+ . color ( card. color )
416+ . size ( font_14) ,
395417 ) ;
396418 let close_btn = ui. small_button ( "x" ) ;
397419 if close_btn. clicked ( ) {
@@ -408,11 +430,12 @@ impl UltraLogApp {
408430 ui. label (
409431 egui:: RichText :: new ( "Min:" )
410432 . color ( egui:: Color32 :: GRAY )
411- . small ( ) ,
433+ . size ( font_12 ) ,
412434 ) ;
413435 ui. label (
414436 egui:: RichText :: new ( min_str)
415- . color ( egui:: Color32 :: LIGHT_GRAY ) ,
437+ . color ( egui:: Color32 :: LIGHT_GRAY )
438+ . size ( font_14) ,
416439 ) ;
417440 if let ( Some ( record) , Some ( time) ) =
418441 ( card. min_record , card. min_time )
@@ -438,11 +461,12 @@ impl UltraLogApp {
438461 ui. label (
439462 egui:: RichText :: new ( "Max:" )
440463 . color ( egui:: Color32 :: GRAY )
441- . small ( ) ,
464+ . size ( font_12 ) ,
442465 ) ;
443466 ui. label (
444467 egui:: RichText :: new ( max_str)
445- . color ( egui:: Color32 :: LIGHT_GRAY ) ,
468+ . color ( egui:: Color32 :: LIGHT_GRAY )
469+ . size ( font_14) ,
446470 ) ;
447471 if let ( Some ( record) , Some ( time) ) =
448472 ( card. max_record , card. max_time )
@@ -488,7 +512,8 @@ impl UltraLogApp {
488512 ui. label (
489513 egui:: RichText :: new ( "Click channels to add them to the chart" )
490514 . italics ( )
491- . color ( egui:: Color32 :: GRAY ) ,
515+ . color ( egui:: Color32 :: GRAY )
516+ . size ( font_16) ,
492517 ) ;
493518 }
494519 }
0 commit comments