[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Simple KWord patch for frames extending beyond the page
From: David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date: 2003-10-16 16:45:11
[Download RAW message or body]
On Thursday 16 October 2003 18:24, you wrote:
> I completely misunderstood what you meant by "higher".
> I thought by "higher" you meant the positioning of the frame relative to the
> page not the "height" of the frame (which I was calling "taller") my
> apologies this makes a lot more sense now.
Oh. I'm not as fluent as I sometimes think I am. You're right, "taller" is much
more accurate, I'll try to remember that in the future.
> aka normalToView( min(bottomY, pageBottom) );
Yup.
> I can fix the "taller than the page" problem. There's the code I posted above
> and this method which I was actually going to use, but wasn't as intuitive to
> read so I didn't use it:
Loops have the tendency to go infinite one day or another :).
Normal calculations are much easier to read IMHO.
> nPages = height/pageHeight;
> normalToView(top) + ( normalToView(pageHeight) * nPages )
> + normalToView(height);
This is still making many assumptions on what normalToView will do
(kind of a recurrent problem with this method I'm afraid...). You cannot
reliably pass a relative Y position to it, it only takes absolute positions.
> I feel it's better to show them this huge obviously problematic frame
> on the screen so they can see it needs to be corrected.
Good point, I agree.
No "clipping the coords" then, let's just show the frame where it is.
What about simply this then?
QRect KWViewModePreview::normalToView( const QRect& nRect ) {
return QRect( normalToView( nRect.topLeft() ), nRect.size() );
}
The contents will still be clipped, of course, but the resize handles should
actually appear out of the page - please check that the user can actually
resize the frame when this happens, we might have code that prevents that :}
--
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.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