@@ -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,26 @@ 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 (
317+ & mut appearance. show_symbol_sizes ,
318+ ShowSymbolSizeState :: Off ,
319+ "Off"
320+ ) ;
321+ ui. selectable_value (
322+ & mut appearance. show_symbol_sizes ,
323+ ShowSymbolSizeState :: Decimal ,
324+ "Decimal"
325+ ) ;
326+ ui. selectable_value (
327+ & mut appearance. show_symbol_sizes ,
328+ ShowSymbolSizeState :: Hex ,
329+ "Hex"
330+ ) ;
331+ } ) ;
332+ ui. separator ( ) ;
305333 ui. horizontal ( |ui| {
306334 ui. label ( "Diff fill color:" ) ;
307335 let mut diff_bg_color =
0 commit comments