Tiny UI fixes, ShrinkingSelection, cursor up/down
Paul Chapman
paul at igblan.free-online.co.uk
Sat Apr 26 13:01:06 UTC 2003
I'm a few days into using Squeak, and I've found a couple of tiny improvements to the UI which I thought I'd post here.
(1) It seems to me that the text insertion point (caret) is one pixel too far right. To fix this, in NewParagraph>>displaySelectionInLine:on: replace
rightX _ rightX + 1.
with
leftX = 0 ifTrue: [rightX _ rightX + 1] ifFalse: [leftX _ leftX - 1].
(2) As a Windows user, I like to have Shift-Del, Ctrl-Ins and Shift-Ins do cut, copy, and paste respectively. To add this behaviour, append the following to InputSensor class>>installKeyDecodeTable :
Smalltalk platformName = 'Win32' ifTrue: [
KeyDecodeTable
at: { 127 . 1 } put: { 120 . 8 }; "Shift-Del -> Cmd-X"
at: { 5 . 1 } put: { 118 . 8}; "Shift-Ins -> Cmd-V"
at: { 5 . 2 } put: { 99 . 8 }; "Ctrl-Ins -> Cmd-C"
yourself]
and then do
InputSensor installKeyDecodeTable
Once I've compiled a few of these, I'll put them up on a Swiki page.
...
Does anyone know what happened to ShrinkingSelection? Trying to load
http://swiki.gsug.org:8080/sqfixes/2826.attachments/ShrinkingSelection.5.sar
gets
Attachment ShrinkingSelection.5.sar not found!
...
Finally, I find the cursor up/down behaviour in wrapped text unusual: surely these should move a *displayed* line at a time, not a *logical* line at a time. Is this being addressed, or is it felt that the current behaviour is "correct"? :)
Cheers, Paul
More information about the Squeak-dev
mailing list
|