(
ui: &mut egui::Ui,
dir: &Option<Utf8PlatformPathBuf>,
label: &str,
tooltip: impl FnOnce(&mut egui::Ui),
appearance: &Appearance,
enabled: bool,
)
| 522 | pub const CONFIG_DISABLED_TEXT: &str = "Value is overridden by the project configuration."; |
| 523 | |
| 524 | fn pick_folder_ui( |
| 525 | ui: &mut egui::Ui, |
| 526 | dir: &Option<Utf8PlatformPathBuf>, |
| 527 | label: &str, |
| 528 | tooltip: impl FnOnce(&mut egui::Ui), |
| 529 | appearance: &Appearance, |
| 530 | enabled: bool, |
| 531 | ) -> egui::Response { |
| 532 | let response = ui.horizontal(|ui| { |
| 533 | subheading(ui, label, appearance); |
| 534 | ui.link(HELP_ICON).on_hover_ui(tooltip); |
| 535 | let button = ui |
| 536 | .add_enabled(enabled, egui::Button::new("Select")) |
| 537 | .on_disabled_hover_text(CONFIG_DISABLED_TEXT); |
| 538 | if !enabled { |
| 539 | project_override_badge(ui).on_hover_text(CONFIG_DISABLED_TEXT); |
| 540 | } |
| 541 | button |
| 542 | }); |
| 543 | ui.label(format_path(dir, appearance)); |
| 544 | response.inner |
| 545 | } |
| 546 | |
| 547 | pub fn project_window( |
| 548 | ctx: &egui::Context, |
no test coverage detected