On Wednesday 12 June 2002 19:23, John Dailey wrote: > This looks like a good plan, and there is no particular reason not to use > the same hack with background color/brush. We can also use a -1 with zoom > < 0.5. I actually think Norbert used this same idea in some of his commit. Yes, I played the whole weekend with it and this seemed to be the easiest w= ay.=20 Because I considered making KSpread a WYSIWYG a too big change. Using the=20 koZoomHandler the normal zoom (100%) is equal to the 133% zoom in the curre= nt=20 implementation, so all the cell are just too big. For handling this we shou= ld=20 think about different default sizes for cells, fonts etc. after 1.2 is=20 released. But I will check the koBorder this weekend. Scrolling if zoom > 1.5 is another problem as well as the ugly look of font= s. Norbert > > By the way, you can notice that in high zoom, the painting problem > disappears when the window is covered by another application, then > uncovered -- showing the problem to be that the old data was never cleare= d. > > > AFAIK it's not the clearing, it's the missing/overwritten background. So > > it wouldn't help to clear the foreground, if the background is still > > missing. > > > > So what I would suppose for a quick hack would be: > > 1. Pass the zoom value to cellPaint > > 2. If zoom > 1.5 then paint background always with width+1/height+1. > > 3. If zoom <> 1.0 repaint right/bottom border too. > > > > Result of the hack would be: > > 1. Minimal intrusive > > 2. Performance penulty only when zoom <> 1.0 > > 3. Only one problem: Colored background would overlapp next cell when > > zoom >1.5, but this would only be visible when there is no border > > (otherwise the border overpaints the background). > > Only 3. would lead to some BR and we can handle this I think. > > Seems to me this way too, but I think we'll eventually be able to work > around it. Notice now that the KSpreadView is already passed into the > painting functions now so we can easily get the zoom value. Just be aware > that it may be a NULL pointer if painting wasn't initiated from a view > (like from a print command). > > > I get more and more the impression, that this is a bug in QT. We have t= he > > code: > > QBrush bb =3D backGroundBrush( cellRef.x(), cellRef.y() ); > > > > if( bb.style() !=3D Qt::NoBrush ) > > { > > painter.fillRect( corner.x(), corner.y(), width, height, bb ); > > } > > > > Why is between fillRect (0,0,60,20,bb) and fillRect(60,20,60,20,bb) an > > empty line on screen at the lines (119,0,120,40) and (0,39,120,40), when > > we have painter.scale(2.0,2.0)? I rather thinking of a rounding bug in = QT > > now, as this behaviour is really strange. But I didn't test with simple > > code yet to prove this issue. > > > > > Of course, if we start painting in coordinates scaled to the zoom then > > > we *will* need the doubles. > > > > > > > > I'll see what I can dig up on the embedding zoom problem tomorrow. > > > > > Hopefully that will be simpler to fix! > > > > > > > > Fine. > > > > > > > > Let's try to fix it. > > > > > > > > Again my hope, that David or Laurent can say something about how > > > > KPresenter and KWord is handling zoom, as when we start to > > > > reprogramming, I don't like to change everything and then see that = it > > > > should have been done > > > > differently. > > > > > > I see David's email....that looks helpful. > > > > Yes, very helpful. I will see what I can do until Sunday. > > For the Beta2, can you try my above described "hack" and upload it, whi= le > > I will try to move to the real zoom values and upload it after Beta2 is > > tagged/released? > > > > Philipp > > _______________________________________________ > > koffice-devel mailing list > > koffice-devel@mail.kde.org > > http://mail.kde.org/mailman/listinfo/koffice-devel > > _______________________________________________ > koffice-devel mailing list > koffice-devel@mail.kde.org > http://mail.kde.org/mailman/listinfo/koffice-devel _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel