(
ui: &mut egui::Ui,
state: &mut AppState,
config_state: &mut ConfigViewState,
appearance: &Appearance,
)
| 559 | } |
| 560 | |
| 561 | fn 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 | }); |
no test coverage detected