We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 634e007 commit 319b1c3Copy full SHA for 319b1c3
src/app.rs
@@ -67,6 +67,7 @@ pub struct ViewConfig {
67
pub ui_font: FontId,
68
pub code_font: FontId,
69
pub diff_colors: Vec<Color32>,
70
+ pub reverse_fn_order: bool,
71
}
72
73
impl Default for ViewConfig {
@@ -75,6 +76,7 @@ impl Default for ViewConfig {
75
76
ui_font: FontId { size: 12.0, family: FontFamily::Proportional },
77
code_font: FontId { size: 14.0, family: FontFamily::Monospace },
78
diff_colors: DEFAULT_COLOR_ROTATION.to_vec(),
79
+ reverse_fn_order: false,
80
81
82
@@ -113,7 +115,6 @@ pub struct ViewState {
113
115
pub check_update: Option<Box<CheckUpdateResult>>,
114
116
// Config
117
pub diff_kind: DiffKind,
- pub reverse_fn_order: bool,
118
pub view_config: ViewConfig,
119
120
@@ -133,7 +134,6 @@ impl Default for ViewState {
133
134
utc_offset: UtcOffset::UTC,
135
check_update: None,
136
diff_kind: Default::default(),
- reverse_fn_order: false,
137
view_config: Default::default(),
138
139
src/views/config.rs
@@ -247,6 +247,6 @@ pub fn config_ui(ui: &mut egui::Ui, config: &Arc<RwLock<AppConfig>>, view_state:
247
248
249
250
- ui.checkbox(&mut view_state.reverse_fn_order, "Reverse function order (deferred)");
+ ui.checkbox(&mut view_state.view_config.reverse_fn_order, "Reverse function order (deferred)");
251
ui.separator();
252
src/views/symbol_diff.rs
@@ -135,7 +135,6 @@ fn symbol_list_ui(
highlighted_symbol: &mut Option<String>,
selected_symbol: &mut Option<SymbolReference>,
current_view: &mut View,
- reverse_function_order: bool,
lower_search: &str,
140
config: &ViewConfig,
141
) {
@@ -164,7 +163,7 @@ fn symbol_list_ui(
164
163
CollapsingHeader::new(format!("{} ({:x})", section.name, section.size))
165
.default_open(true)
166
.show(ui, |ui| {
167
- if section.kind == ObjSectionKind::Code && reverse_function_order {
+ if section.kind == ObjSectionKind::Code && config.reverse_fn_order {
168
for symbol in section.symbols.iter().rev() {
169
if !symbol_matches_search(symbol, lower_search) {
170
continue;
@@ -292,7 +291,6 @@ pub fn symbol_diff_ui(ui: &mut Ui, view_state: &mut ViewState) {
292
291
highlighted_symbol,
293
selected_symbol,
294
current_view,
295
- view_state.reverse_fn_order,
296
&lower_search,
297
&view_state.view_config,
298
);
@@ -312,7 +310,6 @@ pub fn symbol_diff_ui(ui: &mut Ui, view_state: &mut ViewState) {
312
310
313
311
314
315
316
317
318
0 commit comments