[Digikam-devel] [Bug 140131] No zoom in image preview
Gilles Caulier
caulier.gilles at gmail.com
Thu Apr 12 21:43:58 BST 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=140131
------- Additional Comments From caulier.gilles gmail com 2007-04-12 22:43 -------
SVN commit 653197 by cgilles:
digiKam from trunk : new action to set zoom factor to 100% in Preview mode.
CCBUGS: 140131
M +5 -0 albumwidgetstack.cpp
M +1 -0 albumwidgetstack.h
M +9 -0 digikamapp.cpp
M +2 -0 digikamappprivate.h
M +2 -1 digikamui.rc
M +8 -0 digikamview.cpp
M +1 -0 digikamview.h
--- trunk/extragear/graphics/digikam/digikam/albumwidgetstack.cpp #653196:653197
@ -217,6 +217,11 @
d->imagePreviewView->slotDecreaseZoom();
}
+void AlbumWidgetStack::zoomTo100Percents()
+{
+ d->imagePreviewView->setZoomFactor(1.0);
+}
+
void AlbumWidgetStack::fitToWindow()
{
d->imagePreviewView->fitToWindow();
--- trunk/extragear/graphics/digikam/digikam/albumwidgetstack.h #653196:653197
@ -72,6 +72,7 @
void increaseZoom();
void decreaseZoom();
void fitToWindow();
+ void zoomTo100Percents();
bool maxZoom();
bool minZoom();
void setZoomFactor(double z);
--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #653196:653197
@ -800,6 +800,14 @
actionCollection(),
"album_zoomout");
+ d->zoomTo100percents = new KAction(i18n("Zoom to 1:1"),
+ "viewmag1",
+ CTRL+SHIFT+Key_Z,
+ d->view,
+ SLOT(slotZoomTo100Percents()),
+ actionCollection(),
+ "album_zoomto100percents");
+
d->zoomFitToWindowAction = new KAction(i18n("Fit to &Window"),
"view_fit_window",
CTRL+SHIFT+Key_A,
@ -1873,6 +1881,7 @
// View menu
d->albumSortAction->setEnabled(!t);
d->imageSortAction->setEnabled(!t);
+ d->zoomTo100percents->setEnabled(t);
d->zoomFitToWindowAction->setEnabled(t);
}
--- trunk/extragear/graphics/digikam/digikam/digikamappprivate.h #653196:653197
@ -132,6 +132,7 @
zoomTracker = 0;
zoomMinusButton = 0;
zoomPlusButton = 0;
+ zoomTo100percents = 0;
zoomFitToWindowAction = 0;
zoomPlusAction = 0;
zoomMinusAction = 0;
@ -215,6 +216,7 @
KAction *zoomPlusAction;
KAction *zoomMinusAction;
KAction *zoomFitToWindowAction;
+ KAction *zoomTo100percents;
KAction *rating0Star;
KAction *rating1Star;
--- trunk/extragear/graphics/digikam/digikam/digikamui.rc #653196:653197
@ -1,5 +1,5 @
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui version="24" name="digikam" >
+<kpartgui version="25" name="digikam" >
<MenuBar>
@ -64,6 +64,7 @
<Separator/>
<Action name="album_zoomin" />
<Action name="album_zoomout" />
+ <Action name="album_zoomto100percents" />
<Action name="album_zoomfit2window" />
<Separator />
<Action name="album_sort" />
--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #653196:653197
@ -817,6 +817,14 @
}
}
+void DigikamView::slotZoomTo100Percents()
+{
+ if (d->albumWidgetStack->previewMode() == AlbumWidgetStack::PreviewImageMode)
+ {
+ d->albumWidgetStack->zoomTo100Percents();
+ }
+}
+
void DigikamView::slotFitToWindow()
{
if (d->albumWidgetStack->previewMode() == AlbumWidgetStack::PreviewImageMode)
--- trunk/extragear/graphics/digikam/digikam/digikamview.h #653196:653197
@ -81,6 +81,7 @
// View Action slots
void slotZoomIn();
void slotZoomOut();
+ void slotZoomTo100Percents();
void slotFitToWindow();
void slotSlideShowAll();
void slotSlideShowSelection();
More information about the Digikam-devel
mailing list