Version: 0.20 (using KDE 3.2.1, compiled sources) Compiler: gcc version 3.3.1 (SuSE Linux) OS: Linux (i686) release 2.4.21-99-default I'm using German locale (Control-Center -> Region Setting -> Country -> Germany), therefore the decimal separator is set to ',' instead of '.' as opposed to other countries. KGhostView offers the zoom percentage of "66.67" percent in it's dropdown box. Selecting this results in a _really_ small display (using '-' or '+' buttons works fine, though). In short: any percentage "x.y" results in a tiny document, whereas 'x,y' gives the expected zoom level. Changing the country to "default" changes this behaviour, the "x.y" percentages work perfectly well. Bug or feature?
Created attachment 7553 [details] Use locale info to compose zoom values Patch applies to kgv_view.cpp. Uses locale specific decimal separator for fractional zoom values and if entered zoom value is not a number does nothing instead of scaling document to 0%.
Created attachment 7563 [details] Patch against KDE_3_3_0_RELEASE - uses locale info to compose fractional zoom values - if entered zoom value is not a number then does nothing instead of zooming to 0%
Has the patch (20040917) already been applied? If not, please ignore the rest of this comment. -- KGhostView 0.20, KDE-3.3.91 (beta1), CVS 050113 > - uses locale info to compose fractional zoom values Seems to work =) > - if entered zoom value is not a number then does nothing instead > of zooming to 0% Doesn't work. Zooms to 0% if invalid numbers (in the sense of the locale - or strings) are given as zoom values.
> - uses locale info to compose fractional zoom values Well, there's another problem here. Setting decimal separator to "," breaks zooming to values like 125%, while 100% and 200% still works.
Created attachment 9350 [details] patch against KDE_3_3_2_RELEASE The problem with zooming to 125% was KGhostView using sprintf() to create string arguments for XChangeProperty(). sprintf() formats numbers like "1.00" or "1,00", depending on the locale settings, while XChangeProperty() expects them to use dot (".") as decimal separator regardless of your locale. This patch makes it use QString("%1")::arg() instead. The latter always formats numbers according to POSIX locale => zooming always works as expected.
Although a patch is available for a couple of months now, this bug is still valid in KDE-3.4.3 (gentoo) ...
Does not apply to Okular.