MCPcopy Create free account
hub / github.com/encounter/objdiff / split_obj_config_ui

Function split_obj_config_ui

objdiff-gui/src/views/config.rs:561–808  ·  view source on GitHub ↗
(
    ui: &mut egui::Ui,
    state: &mut AppState,
    config_state: &mut ConfigViewState,
    appearance: &Appearance,
)

Source from the content-addressed store, hash-verified

559}
560
561fn split_obj_config_ui(
562 ui: &mut egui::Ui,
563 state: &mut AppState,
564 config_state: &mut ConfigViewState,
565 appearance: &Appearance,
566) {
567 let text_format = TextFormat::simple(appearance.ui_font.clone(), appearance.text_color);
568 let code_format = TextFormat::simple(
569 FontId { size: appearance.ui_font.size, family: appearance.code_font.family.clone() },
570 appearance.emphasized_text_color,
571 );
572
573 let response = pick_folder_ui(
574 ui,
575 &state.config.project_dir,
576 "Project directory",
577 |ui| {
578 let mut job = LayoutJob::default();
579 job.append("The root project directory.\n\n", 0.0, text_format.clone());
580 job.append(
581 "If a configuration file exists, it will be loaded automatically.",
582 0.0,
583 text_format.clone(),
584 );
585 ui.label(job);
586 },
587 appearance,
588 true,
589 );
590 if response.clicked() {
591 config_state.file_dialog_state.queue(
592 || Box::pin(rfd::AsyncFileDialog::new().pick_folder()),
593 FileDialogResult::ProjectDir,
594 );
595 }
596 ui.separator();
597
598 ui.horizontal(|ui| {
599 subheading(ui, "Build program", appearance);
600 ui.link(HELP_ICON).on_hover_ui(|ui| {
601 let mut job = LayoutJob::default();
602 job.append("By default, objdiff will build with ", 0.0, text_format.clone());
603 job.append("make", 0.0, code_format.clone());
604 job.append(
605 ".\nIf the project uses a different build system (e.g. ",
606 0.0,
607 text_format.clone(),
608 );
609 job.append("ninja", 0.0, code_format.clone());
610 job.append(
611 "), specify it here.\nThe program must be in your ",
612 0.0,
613 text_format.clone(),
614 );
615 job.append("PATH", 0.0, code_format.clone());
616 job.append(".", 0.0, text_format.clone());
617 ui.label(job);
618 });

Callers 1

project_windowFunction · 0.85

Calls 9

pick_folder_uiFunction · 0.85
subheadingFunction · 0.85
project_override_badgeFunction · 0.85
fetch_wsl2_distrosFunction · 0.85
patterns_uiFunction · 0.85
queueMethod · 0.80
is_someMethod · 0.80
is_noneMethod · 0.80
separatorMethod · 0.45

Tested by

no test coverage detected