Fix for printouts without margins

David Faure faure at kde.org
Wed Jan 19 12:55:07 GMT 2005


On Wednesday 19 January 2005 10:34, Goffioul Michael wrote:
> I understand the issue, but I see at least 2 problems with this
> patch (not tested, just executed with my brain as C interpreter):
> 1) you remove from the application any way to access physical margin
>    values, even when setFullPage(true); the app must then entirely
>    rely on some guessed/standard default values. Is this wanted?
You're right - let's only change the way things happen for apps which use setFullPage(false).
The new patch does that.

> 2) the GUI of the margin property page does not reflect the change
>    of default values
> I thought about adapting the default margin values with the fullpage
> flag (false -> use Qt's default, true -> use physical values), but
> this would require additional work in the margin property page as the
> settings there are system-widely saved (or not) if they differ from
> default values, while the actual default values might change from one app
> to the other.

The property page only shows up if using setFullPage(false). So why would
the default values change from one app to the other? For a given printer
it will always be QMAX(driver-margins,qt-default-margins), no?
 
> The best is probably to use as default the max between the physical margin
> and some reasonable standard margin. But this has to be done (at least)
> in kprinter.cpp and in kpmarginpage.cpp.
Thanks for the hint. Done in the attached patch.

The margins property page now shows the margins that are indeed going
to be used by default.

On Wednesday 19 January 2005 12:58, Kurt Pfeifle wrote:
> But the margin problem can be finally solved by current 
> KDEPrint controls. It takes one action, one time (and save 
> it) and she will have the print margin setting without any 
> further action needed for all future printouts.
The fact that a workaround exists doesn't change the fact that there's a usability
problem. Before debugging it, it never occured to me that the problem could be
the printer settings (since e.g. kword prints fine). I really thought the bug was 
in khtml. This is also because it also was obvious to me that applications wouldn't
use the "strict minimum" margins by default. Not so obvious apparently, since that
was effectively what was happening.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kprinter3.diff
Type: text/x-diff
Size: 4116 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050119/aee4c1b9/attachment.diff>


More information about the kde-core-devel mailing list