MaddTheSane / Simple-Comic

macOS comic viewer
MIT License
261 stars 23 forks source link

Fix: iBeam cursor when mouse is over recognized text not initially showing. #72

Closed DavidPhillipOster closed 2 years ago

DavidPhillipOster commented 2 years ago

This is a change to one file: OCRTracker.m OCRTracker uses the selection layer to compute the the cursor rects for the i-beam cursor. Simple Comic creates those selection layers during its drawRect: This change delays the call to invalidateCursorRectsForView: late enough that didResetCursorRects has the data that it needs to do the reset.

nickv2002 commented 2 years ago

Oops @DavidPhillipOster - I already sent the previous code though App review. Is this an important fix or should I wait for you to tweak some other stuff?

In any case thanks for your help!

DavidPhillipOster commented 2 years ago

Sigh - It is both harmless and important. I've rewritten the OCR code about six times, most of them in a simplified mock up. Without this last change the mouse cursor won't automatically change to an i-beam unless you click and slightly drag. (it's fine from then on as long as you stay on the page)

With this 3 line change, even if you take no further action, the mouse cursor will change to an i-beam when it moves over selectable text.


I'm going to delete my fork of Simple-Comic, and re-create it as a fresh fork of yours, and ONLY put well-test changes that you can pull in that. Thank you for your patience with me.

On Sun, May 29, 2022 at 7:34 PM Nick Vance @.***> wrote:

Oops @DavidPhillipOster https://github.com/DavidPhillipOster - I already sent the previous code though App review https://github.com/MaddTheSane/Simple-Comic/releases/tag/App-Store-1.9.3. Is this an important fix or should I wait for you to tweak some other stuff?

In any case thanks for your help!

— Reply to this email directly, view it on GitHub https://github.com/MaddTheSane/Simple-Comic/pull/72#issuecomment-1140621783, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHI5FDIFC3UYWUSTEROUQDVMQSMRANCNFSM5XIVKN3Q . You are receiving this because you were mentioned.Message ID: @.***>

MaddTheSane commented 2 years ago

I've cherry-picked the commits.

DavidPhillipOster commented 2 years ago

Thanks! I'm still learning commit tree management in git and github.

I've got Find starting to work: The standard Find submenu works. Apple's Find UI shows in the document windows, and it is starting to work, so far, for search forward, but only within the current page. I still must write the obvious missing pieces: search previous, searches that extend beyond the current page. Also, the selection is subtle, so I'll need to animate the selection change, like Safari does.

DavidPhillipOster commented 2 years ago

I've written up more of a description of my changes on my personal blog: https://davidphilliposter.dreamwidth.org/1745.html

On Sun, May 29, 2022 at 9:16 PM David Phillip Oster < @.***> wrote:

Sigh - It is both harmless and important. I've rewritten the OCR code about six times, most of them in a simplified mock up. Without this last change the mouse cursor won't automatically change to an i-beam unless you click and slightly drag. (it's fine from then on as long as you stay on the page)

With this 3 line change, even if you take no further action, the mouse cursor will change to an i-beam when it moves over selectable text.


I'm going to delete my fork of Simple-Comic, and re-create it as a fresh fork of yours, and ONLY put well-test changes that you can pull in that. Thank you for your patience with me.

On Sun, May 29, 2022 at 7:34 PM Nick Vance @.***> wrote:

Oops @DavidPhillipOster https://github.com/DavidPhillipOster - I already sent the previous code though App review https://github.com/MaddTheSane/Simple-Comic/releases/tag/App-Store-1.9.3. Is this an important fix or should I wait for you to tweak some other stuff?

In any case thanks for your help!

— Reply to this email directly, view it on GitHub https://github.com/MaddTheSane/Simple-Comic/pull/72#issuecomment-1140621783, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHI5FDIFC3UYWUSTEROUQDVMQSMRANCNFSM5XIVKN3Q . You are receiving this because you were mentioned.Message ID: @.***>