[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Patch for KIllustrator and KWord (XIM)
From: David Faure <david () mandrakesoft ! com>
Date: 2001-07-17 13:17:54
[Download RAW message or body]
On Tuesday 17 July 2001 15:51, Toshitaka Fujioka wrote:
> On Tuesday 17 July 2001 20:23, David Faure wrote:
> > > > > QPoint ximPoint = viewMode->normalToView( clip.topRight() );
> > > >
> > > > Out of curiosity, why topRight ?
> > > > Why does it depend on the clip rect ?
> > >
> > > case of ximPoint.x():
> > > http://www.kde.gr.jp/~toshitaka/Kde/KOffice/KWord/xim1.png
> > >
> > > case of cPoint.x():
> > > http://www.kde.gr.jp/~toshitaka/Kde/KOffice/KWord/xim2.png
> >
> > Hehe, I'm not too sure what I'm supposed to see there, but ok ;-)
> > I suppose it's not the vertical line (looks like a normal cursor),
> > so it's the horizontal line (kind of an underline) ? That one looks
> > fine in both shots :}
>
> Character conflicts in cPoint.x().
Oh, I understand now. The slightly "bold" character is the temporary one, that
is supposed to be at the right of the last character.... Wow, cool stuff.
> > > XIM position is delicately wrong. ximPoint.x() is better.
> >
> > It means there's a small offset somewhere (there are 5 horizontal
> > pixels difference between cPoint and cliprect.topRight() - it's as if
> > you had written cPoint.x() + 5). The only problem is that it might change
> > a bit when approaching the right border of the frame, because the cliprect
> > is "clipped" to the frame, so cliprect.topRight() will not be at +5 anymore
>
> Hmm, hmm, XIM position is incomplete with cPoint.x() + 5.
Oops, cPoint is for the clip rect too. Can you try this instead ?
QPoint ximPoint = viewMode->normalToView( nPoint );
> Will you apply this
> QPoint ximPoint = viewMode->normalToView( clip.topRight() );
> int line;
> cursor->parag()->lineStartOfChar( cursor->index(), 0, &line );
> canvas->setXimPosition( ximPoint.x(), ximPoint.y(), 0, h - cursor->parag()->lineSpacing( line ) );
> ?
We're almost there, but I'm not happy about using the topright corner
of the clip-rect. The clip rect could change later for any other reason,
and this is completely unrelated to the XIM position.
I think the line I suggest above should work.
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic