@@ -13,6 +13,7 @@ pub struct Appearance {
1313 pub diff_colors : Vec < Color32 > ,
1414 pub diff_bg_color : Option < Color32 > ,
1515 pub theme : egui:: Theme ,
16+ pub show_symbol_sizes : ShowSymbolSizeState ,
1617
1718 // Applied by theme
1819 #[ serde( skip) ]
@@ -43,6 +44,12 @@ pub struct Appearance {
4344 pub next_code_font : Option < FontId > ,
4445}
4546
47+ #[ derive( serde:: Deserialize , serde:: Serialize , PartialEq , Debug ) ]
48+ pub enum ShowSymbolSizeState {
49+ Off ,
50+ Decimal ,
51+ Hex ,
52+ }
4653pub struct FontState {
4754 definitions : egui:: FontDefinitions ,
4855 source : font_kit:: source:: SystemSource ,
@@ -60,6 +67,7 @@ impl Default for Appearance {
6067 code_font : DEFAULT_CODE_FONT ,
6168 diff_colors : DEFAULT_COLOR_ROTATION . to_vec ( ) ,
6269 theme : egui:: Theme :: Dark ,
70+ show_symbol_sizes : ShowSymbolSizeState :: Off ,
6371 text_color : Color32 :: GRAY ,
6472 emphasized_text_color : Color32 :: LIGHT_GRAY ,
6573 deemphasized_text_color : Color32 :: DARK_GRAY ,
@@ -302,6 +310,14 @@ pub fn appearance_window(ctx: &egui::Context, show: &mut bool, appearance: &mut
302310 appearance,
303311 ) ;
304312 ui. separator ( ) ;
313+ egui:: ComboBox :: from_label ( "Show symbol sizes" )
314+ . selected_text ( format ! ( "{:?}" , appearance. show_symbol_sizes) )
315+ . show_ui ( ui, |ui| {
316+ ui. selectable_value ( & mut appearance. show_symbol_sizes , ShowSymbolSizeState :: Off , "Off" ) ;
317+ ui. selectable_value ( & mut appearance. show_symbol_sizes , ShowSymbolSizeState :: Decimal , "Decimal" ) ;
318+ ui. selectable_value ( & mut appearance. show_symbol_sizes , ShowSymbolSizeState :: Hex , "Hex" ) ;
319+ } ) ;
320+ ui. separator ( ) ;
305321 ui. horizontal ( |ui| {
306322 ui. label ( "Diff fill color:" ) ;
307323 let mut diff_bg_color =
0 commit comments