Jitters

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9745
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Jitters

Post by dunbarx » Wed Dec 14, 2022 7:21 pm

Attached is a thin field with text in it, that text being fairly large in relation to the height of the field. If you try to select a block of text the field jitters.
Problem goes away if the textSize is smaller or the field height is larger.
Jitters.livecode.zip
(761 Bytes) Downloaded 80 times
Craig

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Jitters

Post by jmburnod » Thu Dec 15, 2022 4:25 pm

Hi Craig,
I try your jitter stack.
I can see what you discribe when i try to drag the selection only.
When i just select text I don't see jitter effect.
LC 1.0.0 dp1
kind regards
Jean-Marc
https://alternatic.ch

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9745
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Jitters

Post by dunbarx » Thu Dec 15, 2022 6:44 pm

Jean-Marc.

Yes, only for dragging a selection.

Just wondering if this means anything to anyone. It is true for any field where the field height - textSize < 9. If the difference is exactly 8, there is mild jitter. It does not matter how many lines are in the field, the "displayed" line will jitter.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9853
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Jitters

Post by FourthWorld » Thu Dec 15, 2022 9:14 pm

I would imagine this would occur at any font size when the field height is not greater than the sum of the textHeight + margins.

The engine autoscrolls to selection, and rendering text selection is tricky stuff*. Without sufficient spacing available, it seems the engine's guessing on how to handle that edge is may be suboptimal.

The remedy is simple enough: just provide margins sufficient to meet OS-spec'd defaults and it should be fine. If you find a case where meeting established UI expectations for text size and margins yields the issue I'd recommend filing a bug report.

* Mark Wieder passed me this gem some time ago and it's quite an eye-opener on the challenges of making GUIs text editors:
https://lord.io/text-editing-hates-you-too/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7258
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Jitters

Post by jacque » Thu Dec 15, 2022 10:26 pm

Mark Wieder passed me this gem some time ago and it's quite an eye-opener on the challenges of making GUIs text editors:
That gave me a renewed respect for text-editor programmers. And for Mark Waddingham, who's done his share of this stuff.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Talking LiveCode”