diff options
author | Nick White <git@njw.name> | 2023-07-09 09:32:06 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2023-07-09 09:32:06 +0100 |
commit | e9db2c568a74323d268959836576f63caa392293 (patch) | |
tree | a7a7a89ae35874f2eab6ba304691f6c73a5ebd38 /cmd/rescribe/gui.go | |
parent | 16e77ea6ae00b05cac436810c21577033facb504 (diff) |
Don't disable the log area text widget so the text is readable
Sadly making a custom theme to make the DisabledColor more readable
also affects the disabled buttons, which makes it unclear which are
disabled. So instead just enable the log area - it's not ideal that
it can be typed in, but it's alright, and it needs to be an entry
widget so the text in it can be easily copied.
Diffstat (limited to 'cmd/rescribe/gui.go')
-rw-r--r-- | cmd/rescribe/gui.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/rescribe/gui.go b/cmd/rescribe/gui.go index 16e6bd8..aeb714e 100644 --- a/cmd/rescribe/gui.go +++ b/cmd/rescribe/gui.go @@ -405,7 +405,7 @@ func letsGo(ctx context.Context, log *log.Logger, cmd string, tessdir string, gb } if err != nil { msg := fmt.Sprintf("Error during processing: %v\n", err) - if strings.HasSuffix(err.Error(), "No images found") && strings.HasSuffix(dir.Text, ".pdf") && !f.IsDir() { + if strings.HasSuffix(err.Error(), "No images found") && strings.HasSuffix(dir, ".pdf") && !f.IsDir() { msg = fmt.Sprintf("Error opening PDF\nNo images found in the PDF. Most likely the format of this PDF is not supported,\nextract the images to .jpg manually into a folder first, using a tool like\nthe PDF image extractor at https://pdfcandy.com/extract-images.html.\n") } dialog.ShowError(errors.New(msg), win) @@ -537,7 +537,6 @@ func startGui(log *log.Logger, cmd string, gbookcmd string, training string, tes progressBar.TextFormatter = formatProgressBar(progressBar) logarea := widget.NewMultiLineEntry() - logarea.Disable() detail := widget.NewAccordion(widget.NewAccordionItem("Log", logarea)) |