[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-devel
Subject: Re: LyX 1.3 with MinGW
From: "Michael Schmitt" <michael.schmitt () teststep ! org>
Date: 2004-12-31 15:57:48
Message-ID: 000301c4ef51$7a06ec40$14b2a8c0 () fachwerkrechner
[Download RAW message or body]
> > > Second issue: As you have already pointed out, the menu separator is
> > > not
> > > displayed correctly. The same is true for math formulas. For instance,
> > > create some simple math formula and then select it: The selection
> > > background is shown _below_ the formula! Seems like some offset is
> > > computed incorrectly. Do have any idea how to fix the problem in
> > > cooperation with the kde-cygwin people?
> >
> > Jean-Marc suggests
> > Seeing that menu separator is also badly drawn,
> > I would suggest that there is a bug in the implementation
> > of QPainter::drawPolyline in qt3/win32. It would be nice to
> > find a test program that shows a bad behaviour, so that it
> > can be fixed.
>
> This doesn´t seem te be it. Any other suggestions?
I also looked at QPainter::drawPolyline(...) and I was a bit astonished by
its complexity. The X Window function looks simple but the Windows port adds
a lot of lines of codes. In particular, the following segment looks
suspicious:
for (int i=1; i<npoints; i++) {
newX = pa[index+i].x();
newY = pa[index+i].y();
if ( y1 != newY && x1 != newX ) {
newX++; newY++;
}
else if ( y1 == newY ) newX++;
else if ( x1 == newX ) newY++;
LineTo( hdc, newX, newY );
x1 = newX;
y1 = newY;
}
Why is newX/Y first set to the initial X/Y coordinate and afterwards
increased by 1 (!) depending on the number of points?
Anyway, I played a bit with LyX and I noticed that the LyX menu separator
itself is drawn correctly, i.e. the polygon is drawn correctly and does not
exceed the clip box. You can check this by adding a menu separator to an
empty document or at the end of a document.
So there may be two possible reasons (please forgive me if I am telling
non-sense; I am not a GUI expert).
1. The clip box itself is not set to the correct position.
2. QtFree/Win32 uses y coordinates in the wrong way because (just a guess!)
X11 uses increasing y values from bottom to top whereas Win32 uses
increasing y values from top to bottom. (Unfortunately, the menu separator
symbol is symmetrical so we cannot exclude this alternative...)
Just some thoughts...
Happy new year, everybody! Michael
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic