@@ -13,6 +13,7 @@ pub struct Appearance {
13
13
pub diff_colors : Vec < Color32 > ,
14
14
pub diff_bg_color : Option < Color32 > ,
15
15
pub theme : egui:: Theme ,
16
+ pub show_symbol_sizes : ShowSymbolSizeState ,
16
17
17
18
// Applied by theme
18
19
#[ serde( skip) ]
@@ -43,6 +44,12 @@ pub struct Appearance {
43
44
pub next_code_font : Option < FontId > ,
44
45
}
45
46
47
+ #[ derive( serde:: Deserialize , serde:: Serialize , PartialEq , Debug ) ]
48
+ pub enum ShowSymbolSizeState {
49
+ Off ,
50
+ Decimal ,
51
+ Hex ,
52
+ }
46
53
pub struct FontState {
47
54
definitions : egui:: FontDefinitions ,
48
55
source : font_kit:: source:: SystemSource ,
@@ -60,6 +67,7 @@ impl Default for Appearance {
60
67
code_font : DEFAULT_CODE_FONT ,
61
68
diff_colors : DEFAULT_COLOR_ROTATION . to_vec ( ) ,
62
69
theme : egui:: Theme :: Dark ,
70
+ show_symbol_sizes : ShowSymbolSizeState :: Off ,
63
71
text_color : Color32 :: GRAY ,
64
72
emphasized_text_color : Color32 :: LIGHT_GRAY ,
65
73
deemphasized_text_color : Color32 :: DARK_GRAY ,
@@ -302,6 +310,26 @@ pub fn appearance_window(ctx: &egui::Context, show: &mut bool, appearance: &mut
302
310
appearance,
303
311
) ;
304
312
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 ( ) ;
305
333
ui. horizontal ( |ui| {
306
334
ui. label ( "Diff fill color:" ) ;
307
335
let mut diff_bg_color =
0 commit comments