diff --git a/src/app/viewer.jai b/src/app/viewer.jai index 9698f3f..149fb70 100644 --- a/src/app/viewer.jai +++ b/src/app/viewer.jai @@ -544,6 +544,15 @@ viewer_ui :: () { using ImGui; SameLine(); SetNextItemWidth(160); SliderFloat("Size", *viewer.thumb_size, 64, MCAP_PREVIEW_MAX_SIDE, "%.0f px"); + SameLine(); + // The OCR window (app/ocr_ui.jai): the model, GPU or CPU, and the library scan. + if Button("OCR") ocr_ui.window_open = !ocr_ui.window_open; + if IsItemHovered() { + engine: *Ocr_Engine; + if !ocr_ui.thread_busy engine = ocr_ui.engine; // the background thread owns it while busy + if engine SetTooltip("OCR with %, on %", engine.model.name, ifx engine.provider == .CUDA then "the GPU" else "the CPU"); + else SetTooltip("OCR is starting, or could not start; the OCR window says which"); + } // A running OCR scan, as a thin bar under the search, so it shows with the OCR window closed. if ocr_ui.scan.running {