Default page size now missing

John Layt jlayt at kde.org
Thu Jul 30 00:26:55 UTC 2015


On 29 July 2015 at 22:43, Jaroslaw Staniek <staniek at kde.org> wrote:
> Hi,
> While looking at possible improvements of QPageSize (with John),
> another finding:
> Defaults for page size for KDE SC 4 apps come from the locale based on
> KLocale and specific config value. Now in QLocale we miss this
> information. QPrinterInfo::defaultPrinter().defaultPageSize() is
> something different, it more depends on the default printer, its
> defaults and capabilities.
>
> For example, traditionally, USA has "Letter" as default and some other
> countries have "A4".
>
>
> The thing is that the default page size is also used for creation of
> documents (ODF, PDF...).
>
> Any ideas on how to address that in apps that don't use
> kdelibs4support? And maybe in KF5 and/or Qt.
> And do we want to address that?
> Even if Plasma 5 offers this config to the user, apps will ignore it
> one day when they from usage of kdelibs4support. That could be
> misleading.
>
> Personally I am copying the one-liners from kdelibs4support as a
> temporary solution: if a given config value is found, it's used.
>
> --
> regards, Jaroslaw Staniek
>
> KDE:
> : A world-wide network of software engineers, artists, writers, translators
> : and facilitators committed to Free Software development - http://kde.org
> Calligra Suite:
> : A graphic art and office suite - http://calligra.org
> Kexi:
> : A visual database apps builder - http://calligra.org/kexi
> Qt Certified Specialist:
> : http://www.linkedin.com/in/jstaniek

The KLocale default page size was actually used in very very few
places, and usually by mistake when they really wanted the default
printer paper size to render a print-out to, leading to lots of issues
with printers complaining about the wrong paper size. Allowing it to
be set in KLocale led to a lot of user confusion on the difference
between the two, there are some long and rather ugly bugzilla threads
on the matter I do not wish to revisit. I'd also argue that the
default page size needed for one app is not necessarily the same as
for some other apps, depending on their use case. Writing a letter I
probably do want A4, doing a flow-chart I usually want A3, doing a
presentation I want projector screen 4:3 ratio, doing a painting in
Krita it's whatever size the artwork needs.

I'd rather not reintroduce all that, instead most use cases should
check the default printer page size to render to, or if they do need a
page size then if QLocale::measurementSystem() ==
QLocale::ImperialUSSystem use Letter, otherwise use A4 (this is
exactly what the KLocale files are set up as, only the USA isn't A4,
and PDF printing in Qt does this to choose its default page size too).

In Calligra I could see the case for having the ability to set a
default page size for your apps to follow as you are in the business
of generating new documents with fixed page sizes, but very few other
apps actually need to do so (I'm struggling to think of more than
lyx), must just want it to print to. I think this belongs in Calligra
settings.

Cheers!

John.


More information about the Kde-frameworks-devel mailing list