[0.0.0] Viewer: an OCR button beside the search, as the OCR window only opened itself when CUDA was missing
This commit is contained in:
parent
e2334e8be5
commit
962f0d7515
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user