gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Textview problem


From: Wolfgang Lux
Subject: Re: Textview problem
Date: Tue, 23 Jul 2013 09:20:18 +0200

Hi Germán,

> I'm having a problem with Gemas.app when load a file. If I move
> the scroll knob to the end of the file, the knob stops at bottom. But
> if you see the attached image, obviously that isn't the end of the file.
> A click over one arrow or move the knob solves the problem. But if I
> remember correctly, this worked perfectly some weeks ago. I can't
> reproduce this problem with Ink.

I had a look at this yesterday evening. The problems show up only in Gemas.app 
because of the way you make use of the highlighter kit, namely that 
highlighting is applied in the drawRect: method. When you scroll to the end of 
the document, the gui uses the current size of the document to determine the 
visible rectangle. The drawRect: method will be called only at the end of the 
event loop when the document rectangle has been chosen. The problem now is that 
highlighting changes the font of some characters from regular to bold, which 
means that some lines will get wider (at least if a non-proportional font is 
used). Since lines are soft wrapped, this may change the height of your 
document and so the visible rectangle may no longer correspond to the bottom 
rectangle of your document. To fix the issues with Gemas you should make sure 
that highlighting is applied more early to your documents.

Wolfgang

PS Since Geman uses soft wrapping, you should hide the pointless horizontal 
scrollbar in your document windows. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]