Version: 0.7.2 (using KDE KDE 3.3.2)
Installed from: Gentoo Packages
It can be a bit frustrating when you always need to hit 'zoom out' ten times before you can see the whole image.
Please scale the image to fit in the window immediately after opening the image.
Then you should use "Zoom AutoFit" from the toolbar or the View menu.
We have a nice handbook ;-)
Sorry, It did not come to my mind that this option in the View menu could be a toggle. And I know a few other users who would be pleasantly surprised if I would show it to them as well.
The thing is, with other graphics applications, examining your photo's usually works like this:
* You open the image, it is automatically scaled to sane dimensions. By default.
* You use the 'zoom in' control to zoom in and check the detail level. Or even quicker: You choose '100%' from the zoom drop-down menu.
With DigiKam, 'fit to window' toggle disabled, it works different:
* You open the image, it is displayed at 100% by default, so you can't see a thing.
* You use the 'zoom out' control five or six times to zoom out and see the whole image.
* You use the 'zoom in' control five or six times to zoom in again, to examine interesting parts of the image.
and when 'fit to window' is enabled:
* You open the image, it is automatically scaled to sane dimensions.
* You disable the 'fit to window' option in order to be able to use the zoom controls. The image viewer throws you back to 100% and you're completely lost again.
* You use the 'zoom out' function a couple of times to get an idea of where you are.
* You scroll to an interesting part of the image
* You use the 'zoom in' function a couple of times to examine the part of image you are interested in.
I guess people are so much used to the way things usually work, it does not come to their mind that DigiKam may work completely different in this respect. The 'fit to window' option is usually never a toggle but a function that just calculates the right zoom factor for you, and apply it. Also, most applications scale the image on opening to sane size, by default. People are used to that. Hitting the 'scale to fit window' button in DigiKam has another unexpected effect: it disables all zoom controls.
So consider this bugreport a usability report in stead.
And yes, I will RTFM when I find some time.. :)
Shall I reopen this bug and change the summary to a request for a different scaling behavior?
Yes, go ahead. There are some good points.
Yes, I was going to report this as well. I think that a good solution is to not disable the + and - buttons while autofit is enabled.
Then you can just zoom in instead of having to disable autofit first (which throws you at a 100% size which can be very large due to todays camera's (my new one has 7mp)).
But the autofit should not switch off when zooming. (If autofit is on, paging to the next photo will display it autofit again). The idea is thus that autofit is just a feature that kicks in on initial display of the image (and on resize of the viewport), but that after displaying the image leaves the user free to zoom it in or out without having to disable autofit first.
Totally agree with Wilbert last comment, ok for "fit to screen" buttons, but zoom ones never goes off.
It's totally user unfriendly the behaviour like it's now also in digikam 0.9
please change it :)
I stumbled too over the disabled zoom in/out buttons.
I had a look at gwenview, kpdf and kghostview. Both
use the same zoom in/out/fit combo of buttons in the status
bar, with fit to window as default.
For consistency amoung KDE apps I also like to see digikam
using the same widgets for zoom handling, with fit to screen
FWIW: https://bugs.kde.org/show_bug.cgi?id=137236 is related,
if not a duplicate of this bug.
Well gwenview has a better implementation ;)
Can you test this patch? It's not all you asked for,
but I can improve it if you like, porting more code
from the one i implemented for gwenview.
To reporters, try to use gwenview by now for that
even if it has a little bug I'm working, that
does not restore the scale option enabled.
---------- Messaggio inoltrato ----------
Subject: [Digikam-devel] image editor and print option (patch)
Date: 22:08, venerdì 29 dicembre 2006
From: Angelo Naselli <anaselli at linux dot it>
first of all I'd like to introduce myself, as some of you know
I'm kipi's project coordinator and an occasional developer.
Since I like the way gwenview prints photos (maybe just
because I did, but I did because i'd have liked to have it :) )
I decided to port that code here. I mean there are two ways
to print, either using kipi-plugins or using image editor.
The first one is the best, but sometime i like to print out an
image just because i'm watching it. If I use gwenview the code
allows it and manages two options that are missed here e.g.
keep ratio and alignment. Well there is something more but i've
spent a lot of time to insert gui objects, I'm not very good at it
and i prefer to use ui files and designer (Gilles I know you don't,
but it's very easy for occasional contributors), so the code is still
in gwenview. Just want to recall the B&W option I cannot believe someone
ever used it, two colors, better using grayscale, but that is a driver
option, so no need to add it ;) (even if the preview is not good)
IIRC the so called "fit to page" option works if an image has to
be enlarge and not shrinked... And all of that is in gwenview
Anyway the attached patch is something that improve the print function.
Hope you'll like it and commit (i can do it if you like).
Just another thought, why trash is near print in the menu, it seems
a bit dangerous...
Created an attachment (id=19069)
sorry I've totally misunderstood the subject... I should stop drinking ;)
sorry again for my intrusion....
SVN commit 644437 by cgilles:
digiKam from trunk : add a combo box with a pre-zoom selection options like gimp prvovide. You can enter a customized zoom scale value if you want.
M +22 -26 canvas/canvas.cpp
M +1 -0 canvas/canvas.h
M +2 -1 editor/digikamimagewindowui.rc
M +56 -7 editor/editorwindow.cpp
M +3 -1 editor/editorwindow.h
M +8 -0 editor/editorwindowprivate.h
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/canvas.cpp #644436:644437
@@ -1,6 +1,6 @@
* Authors: Renchi Raju <email@example.com>
- * Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Gilles Caulier <caulier dot gilles at gmail dot com>
* Date : 2003-01-09
* Description : image editor canvas management class
@@ -70,16 +70,15 @@
- CanvasPrivate() :
- tileSize(128), maxZoom(8.0)
+ CanvasPrivate() :
+ tileSize(128), minZoom(0.1), maxZoom(10.0), zoomStep(0.1)
parent = 0;
im = 0;
rubber = 0;
paintTimer = 0;
@@ -97,7 +96,9 @@
+ const double minZoom;
const double maxZoom;
+ const double zoomStep;
@@ -114,7 +115,6 @@
@@ -817,12 +817,12 @@
- return ((d->zoom + 1.0/16.0) >= d->maxZoom);
+ return ((d->zoom + d->zoomStep) >= d->maxZoom);
- return ((d->zoom - 1.0/16.0) <= 0.1);
+ return ((d->zoom - d->zoomStep) <= d->minZoom);
@@ -832,33 +832,29 @@
- if (d->autoZoom || maxZoom())
+ if (maxZoom())
- float cpx = (contentsX() + visibleWidth() / 2.0) / d->zoom;
- float cpy = (contentsY() + visibleHeight() / 2.0) / d->zoom;
+ setZoomFactor(d->zoom + d->zoomStep);
- d->zoom = d->zoom + 1.0/16.0;
+ if (minZoom())
- center((int)(cpx * d->zoom), (int)(cpy * d->zoom));
- emit signalZoomChanged(d->zoom);
+ setZoomFactor(d->zoom - d->zoomStep);
+void Canvas::setZoomFactor(float zoom)
- if (d->autoZoom || minZoom())
+ if (d->autoZoom)
float cpx = (contentsX() + visibleWidth() / 2.0) / d->zoom;
- float cpy = (contentsY() + visibleHeight() / 2.0) / d->zoom;
- d->zoom = d->zoom - 1.0/16.0;
+ float cpy = (contentsY() + visibleHeight() / 2.0) / d->zoom;
+ d->zoom = zoom;
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/canvas.h #644436:644437
@@ -75,6 +75,7 @@
+ void setZoomFactor(float z);
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/digikamimagewindowui.rc #644436:644437
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui version="10" name="digikamimagewindow" >
+<gui version="11" name="digikamimagewindow" >
@@ -87,6 +87,7 @@
<Action name="editorwindow_revert" />
<Action name="editorwindow_zoomplus" />
+ <Action name="editorwindow_zoomto" />
<Action name="editorwindow_zoomminus" />
<Action name="editorwindow_zoomfit" />
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp #644436:644437
@@ -26,6 +26,10 @@
+// C++ includes.
// Qt includes.
@@ -70,6 +74,7 @@
// Local includes.
@@ -311,12 +316,41 @@
d->zoomPlusAction = KStdAction::zoomIn(m_canvas, SLOT(slotIncreaseZoom()),
d->zoomMinusAction = KStdAction::zoomOut(m_canvas, SLOT(slotDecreaseZoom()),
d->zoomFitAction = new KToggleAction(i18n("Zoom &AutoFit"), "viewmagfit",
CTRL+SHIFT+Key_A, this, SLOT(slotToggleAutoZoom()),
+ d->zoomCombo = new KComboBox(true);
+ d->zoomComboAction = new KWidgetAction(d->zoomCombo, i18n("Zoom"), 0, 0, 0,
+ actionCollection(), "editorwindow_zoomto");
+ connect(d->zoomCombo, SIGNAL(activated(int)),
+ this, SLOT(slotZoomSelected()) );
+ connect(d->zoomCombo, SIGNAL(returnPressed(const QString&)),
+ this, SLOT(slotZoomTextChanged(const QString &)) );
m_fullScreenAction = KStdAction::fullScreen(this, SLOT(slotToggleFullScreen()),
actionCollection(), this, "editorwindow_fullscreen");
@@ -618,21 +652,36 @@
bool checked = d->zoomFitAction->isChecked();
+void EditorWindow::slotZoomTextChanged(const QString &txt)
+ double zoom = KGlobal::locale()->readNumber(txt) / 100.0;
+ if (zoom > 0.0)
+ QString txt = d->zoomCombo->currentText();
+ txt = txt.left(txt.find('%'));
void EditorWindow::slotZoomChanged(float zoom)
- m_zoomLabel->setText(i18n("Zoom: ") +
- QString::number(zoom*100, 'f', 2) +
+ m_zoomLabel->setText(i18n("Zoom: %1%").arg(QString::number(lround(zoom*100.0))));
- d->zoomPlusAction->setEnabled(!m_canvas->maxZoom() &&
- d->zoomMinusAction->setEnabled(!m_canvas->minZoom() &&
+ d->zoomPlusAction->setEnabled(!m_canvas->maxZoom() && !d->zoomFitAction->isChecked());
+ d->zoomMinusAction->setEnabled(!m_canvas->minZoom() && !d->zoomFitAction->isChecked());
+ d->zoomCombo->setCurrentText(QString::number(lround(zoom*100.0)) + QString("%"));
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.h #644436:644437
@@ -173,7 +173,6 @@
- void slotZoomChanged(float zoom);
void slotLoadingProgress(const QString& filePath, float progress);
@@ -206,6 +205,9 @@
void slotSavingFinished(const QString &filename, bool success);
+ void slotZoomSelected();
+ void slotZoomTextChanged(const QString &);
+ void slotZoomChanged(float zoom);
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindowprivate.h #644436:644437
@@ -24,8 +24,10 @@
@@ -72,6 +74,8 @@
viewUnderExpoAction = 0;
viewOverExpoAction = 0;
slideShowAction = 0;
+ zoomCombo = 0;
+ zoomComboAction = 0;
@@ -82,6 +86,8 @@
+ KComboBox *zoomCombo;
@@ -108,6 +114,8 @@
+ KWidgetAction *zoomComboAction;
great that you tackle the issue of zooming!!!
However, I think not all points discussed above have been considered,
in particular #7: """ I think that a good solution is to not disable the + and - buttons while autofit is enabled."""
Apart from that: There is maybe one more issue with the Combo-Box:
if you put it on (for example) 50% and then go
from one image to the next, it switches back to 100%.
Shouldn't it just stay the same?
Maybe one could get completely rid of the "autozoom toggle"
if the Combo-box get's another entry "fit"?
(And, just for completeness: there is also the related
Yes, i know #103645. I will try to fix it too. I'm currently working on all editor Zoom stuff...
While this bug has been marked as fixed, I don't think
that it has been addressed completely.
Therefore I suggest to re-open because the following should
- do not disable the + and - buttons while autofit is enabled.
This is the main open point, see #2, #7, #9.
- If auto-fit is active, and then zooming is used, the
auto-fit should be de-activated.
This ensures that one still (i.e. as it works nicely right now)
can go from one image to the next without loosing the current
zoom-level and position; This allows to compare two (or more)
images in a certain region by just going back-and-forth
- Minor detail:
The order of the buttons should be changed to
[- Zoom out] [ % ] [+ Zoom in]
to be consistent with the usual ordering as in the preview widget
(excuse broken english below)
Bug 137236 resolution patch introduces a strange behavior. When an image is small, the autofit toggle bring it to window size. Small images should, IMHO, not be resized BIGGER than what they are. This can produce ugly things.
Very annoying when I'm working on directories with two types of pictures : large pictures taken with DSLR, and small picture resized of the DSLR one to fit web pages.
The DSLR pictures are resized to fit into windows. Very good.
The web picture (600x400) are resized to almost 1200x800, so they definitely look ugly.
If I untoggle the autofit button, the next DSLR picture, 3800x2600 is impossible to look at. So I must toggle on each pictures.
Hope it helps.
You can contact me for any explanation (in french if you like)
I have to say the same as Laurent did in #16. Meanwhile I found a bug report #126127. So I realized this behavior based on a wish. So could you make this feature configurable? I mean some people would like to see the low resolution picture enlarged when fit to window enabled, some people like Laurent and would like to see these pictures on original size. Because enlarged low resolution pictures are ugly.