MCPcopy Index your code
hub / github.com/encounter/objdiff / pick_folder_ui

Function pick_folder_ui

objdiff-gui/src/views/config.rs:524–545  ·  view source on GitHub ↗
(
    ui: &mut egui::Ui,
    dir: &Option<Utf8PlatformPathBuf>,
    label: &str,
    tooltip: impl FnOnce(&mut egui::Ui),
    appearance: &Appearance,
    enabled: bool,
)

Source from the content-addressed store, hash-verified

522pub const CONFIG_DISABLED_TEXT: &str = "Value is overridden by the project configuration.";
523
524fn 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
547pub fn project_window(
548 ctx: &egui::Context,

Callers 1

split_obj_config_uiFunction · 0.85

Calls 3

subheadingFunction · 0.85
project_override_badgeFunction · 0.85
format_pathFunction · 0.85

Tested by

no test coverage detected