Summary: | Zoom steps in image editor | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Mikolaj Machowski <mikmach> |
Component: | ImageEditor-Canvas | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 0.9.4 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.4 | |
Sentry Crash Report: | |||
Attachments: |
snap to 50%, 100% and fit as zoom values for the image editor
snap to 50%, 100% and fit as zoom values for the image editor snap to 50%, 100% and fit as zoom values for the image editor, revised |
Description
Mikolaj Machowski
2008-04-20 21:49:14 UTC
Created attachment 24501 [details]
snap to 50%, 100% and fit as zoom values for the image editor
This patch does not introduce snapping for the list of zoom-values
because just next to it there is a "fit-to-window" button.
Also this would require a lot of code for the special case of a string like
"fit"
in EditorWindow::slotZoomTextChanged(const QString &txt).
Mikolaj, it would be great if you could give this a thorough test...
> --> (http://bugs.kde.org/attachment.cgi?id=24501&action=view)
Doesn't work against latest svn. When tried to apply by hand it ended
with:
ighttableview.cpp: In member function 'void
Digikam::LightTableView::toggleFitToWindowOr100()':
lighttableview.cpp:241: error: no matching function for call
to 'Digikam::LightTablePreview::setZoomFactor(double, bool)'
../../../digikam/libs/widgets/common/previewwidget.h:53: note: candidates
are: void Digikam::PreviewWidget::setZoomFactor(double)
lighttableview.cpp:242: error: no matching function for call
to 'Digikam::LightTablePreview::setZoomFactor(double, bool)'
../../../digikam/libs/widgets/common/previewwidget.h:53: note: candidates
are: void Digikam::PreviewWidget::setZoomFactor(double)
make[2]: *** [lighttableview.lo] Error 1
make[2]: Leaving directory
`/home/mikolaj/kde/head/extragear/graphics/digikam/utilities/lighttable'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/mikolaj/kde/head/extragear/graphics/digikam/utilities'
make: *** [all-recursive] Error 1
mikolaj@localhost extragear/graphics/digikam $ svn up
W wersji 801135.
Mikolaj, I just tried the patch with current svn and it does compile fine. The toggleFitToWindowOr100() stuff comes from a different patch. Did you check that `svn diff` is empty before applying the patch here? Thanks, patched. 100% works always. With 50% is funny twist. When going to it first time it IE never stops at it, each next time going "up" (toward 100%) it is working and usually works when going "down" but not always. Sorry, don't see any regularity With fit to window is problem when zoom factor is very close to 50% or 100% (eg. 49% is required for fit). Couldn't really track when it causes trouble - and which zooming step causes problems. Maybe it is related to mentioned 50% issues? Usually you can see it when going "down" to lower zoom factors. Created attachment 24579 [details]
snap to 50%, 100% and fit as zoom values for the image editor
Hi Mikolaj,
thanks a lot for your careful testing, which exposed a stupid bug.
The new version seems to work fine for me in all cases.
Best Arnd
Does it depend on any other patches? It should not, why? Thanks, patch works. There is small usability thing: Let's say we are going from 100% down, there are steps: 100% -> 91% -> 78% -> 66% -> 52% -> 50% -> 42% -> Fit screen Change between 52% and 50% (one of special cases) is really small. Don't know if it is possible but I would suggest some "thinking" before deciding about next step: 66% -> next step is 52%, it is less than 5% from 50%, snap to 50%. This "thinking" should applies also to Fit to screen and 100% factors of course. Mikolaj, thanks a lot for testing! About the "thinking": yes, this would be nice. Presumably the best for this would be to pre-compute the sequence of zoom steps, in some meaningful way. This might be tricky, and for the moment I would like to proceed with some other bugs, which I find more nagging ... ;-) So maybe this "thinking" should go into another BKO? Gilles, could you please review this patch? Best, Arnd > So maybe this "thinking" should go into another BKO? Created Bug 161619 with additional notes. Patch cannot be applied against svn : patch -p0 < 161085.patch patching file utilities/imageeditor/canvas/canvas.cpp Hunk #2 FAILED at 975. 1 out of 2 hunks FAILED -- saving rejects to file utilities/imageeditor/canvas/canvas.cpp.rej patching file utilities/imageeditor/canvas/canvas.h Hunk #1 FAILED at 82. 1 out of 1 hunk FAILED -- saving rejects to file utilities/imageeditor/canvas/canvas.h.rej Gilles Created attachment 24795 [details]
snap to 50%, 100% and fit as zoom values for the image editor, revised
updated patch to current svn
SVN commit 808506 by abaecker: When changing the zoom in the image editor, snap to 50%, 100% and fit-to-window. CCBUGS: 161085 TODO:KDE4PORT M +2 -1 NEWS M +88 -2 utilities/imageeditor/canvas/canvas.cpp M +3 -0 utilities/imageeditor/canvas/canvas.h WebSVN link: http://websvn.kde.org/?view=rev&revision=808506 SVN commit 808717 by cgilles: backport commit #808506 from KDE3 branch CCBUGS: 161085 M +69 -2 canvas.cpp M +3 -0 canvas.h WebSVN link: http://websvn.kde.org/?view=rev&revision=808717 Gilles, I think this bug can be closed now. Best, Arnd *** Bug has been marked as fixed ***. |