[QScintilla] wrong cursor moving
David Hess
dhess at fishsoftware.com
Sun Nov 7 23:33:47 GMT 2010
On Nov 6, 2010, at 8:50 AM, Petr Vaněk wrote:
> ... snip ...
>>> changes if you highlight it via selection.
>>>
>>> So it seems not to just be a cursor positioning issue but also a layout
>>> problem.
>> Out of curiosity, if the patch did...
>>
>> qRound(ceil(width));
>>
>> ...is it any better?
>
> for me it seems little bit worse with the ceil(). But maybe it's only due my
> tired eyes.
>
> Anyway, I can confirm the selection display is somehow wrong - with or without
> the patch as well.
>
>> Even if the patch isn't exactly correct, is it a definite improvement?
>
> for me it makes qsci finally usable on mac - at least the cursor is in the
> right place.
It may be the colorizing making the difference for me, but it still seems pretty bad overall. A long line with colorized text will still put the cursor in the wrong place.
Poking around inside of Scintilla shows that it uses integer pixel positions which I guess your patch is attempting to deal with?
I did some searching in the Qt bug database and saw this ticket: http://bugreports.qt.nokia.com/browse/QTBUG-11234
It seems that adding:
f->setStyleStrategy(QFont::ForceIntegerMetrics);
to Font::Create(...) is worth a try?
I'm working with 4.6.2 which doesn't have QFont::ForceIntegerMetrics. Petr are you working with > 4.6.2 and if so can you try that?
Dave
More information about the QScintilla
mailing list