[Digikam-devel] [Bug 140131] No zoom in image preview
Gilles Caulier
caulier.gilles at gmail.com
Tue Apr 10 07:20:25 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-10 08:20 -------
SVN commit 652122 by cgilles:
digiKam from trunk : Zoom In/Out buttons are now in statusbar, around the zoom slider.
CCBUGS: 140131
M +29 -2 digikamapp.cpp
M +6 -0 digikamappprivate.h
M +1 -4 digikamui.rc
--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #652121:652122
@ -30,6 +30,7 @
#include <qtooltip.h>
#include <qsignalmapper.h>
#include <qdockarea.h>
+#include <qhbox.h>
// KDE includes.
@ -341,19 +342,43 @
d->statusProgressBar->setMaximumHeight(fontMetrics().height()+2);
statusBar()->addWidget(d->statusProgressBar, 100, true);
+ //------------------------------------------------------------------------------
+
+ QHBox *zoomBar = new QHBox(statusBar());
+
+ d->zoomMinusButton = new QToolButton(zoomBar);
+ d->zoomMinusButton->setAutoRaise(true);
+ d->zoomMinusButton->setIconSet(SmallIconSet("viewmag-"));
+ QToolTip::add(d->zoomMinusButton, i18n("Zoom out"));
+
d->thumbSizeSlider = new QSlider(ThumbnailSize::Small, ThumbnailSize::Huge,
ThumbnailSize::Step, ThumbnailSize::Medium,
- Qt::Horizontal, statusBar());
+ Qt::Horizontal, zoomBar);
d->thumbSizeSlider->setMaximumHeight(fontMetrics().height()+2);
d->thumbSizeSlider->setFixedWidth(120);
+ d->zoomPlusButton = new QToolButton(zoomBar);
+ d->zoomPlusButton->setAutoRaise(true);
+ d->zoomPlusButton->setIconSet(SmallIconSet("viewmag+"));
+ QToolTip::add(d->zoomPlusButton, i18n("Zoom in"));
+
d->thumbSizeTracker = new DTipTracker("", d->thumbSizeSlider);
- statusBar()->addWidget(d->thumbSizeSlider, 1, true);
+
+ statusBar()->addWidget(zoomBar, 1, true);
+
+ //------------------------------------------------------------------------------
+
d->statusNavigateBar = new StatusNavigateBar(statusBar());
d->statusNavigateBar->setMaximumHeight(fontMetrics().height()+2);
statusBar()->addWidget(d->statusNavigateBar, 1, true);
+ connect(d->zoomMinusButton, SIGNAL(clicked()),
+ d->view, SLOT(slotZoomOut()));
+
+ connect(d->zoomPlusButton, SIGNAL(clicked()),
+ d->view, SLOT(slotZoomIn()));
+
connect(d->thumbSizeSlider, SIGNAL(valueChanged(int)),
this, SLOT(slotThumbSizeTimer(int)));
@ -924,11 +949,13 @
void DigikamApp::enableThumbSizePlusAction(bool val)
{
d->thumbSizePlusAction->setEnabled(val);
+ d->zoomPlusButton->setEnabled(val);
}
void DigikamApp::enableThumbSizeMinusAction(bool val)
{
d->thumbSizeMinusAction->setEnabled(val);
+ d->zoomMinusButton->setEnabled(val);
}
void DigikamApp::enableAlbumBackwardHistory(bool enable)
--- trunk/extragear/graphics/digikam/digikam/digikamappprivate.h #652121:652122
@ -24,6 +24,7 @
#include <qstring.h>
#include <qmap.h>
#include <qslider.h>
+#include <qtoolbutton.h>
#include <qtimer.h>
// KDE includes.
@ -131,6 +132,8 @
splashScreen = 0;
thumbSizeSlider = 0;
thumbSizeTracker = 0;
+ zoomMinusButton = 0;
+ zoomPlusButton = 0;
}
bool fullScreen;
@ -150,6 +153,9 @
QString cameraGuiPath;
+ QToolButton *zoomPlusButton;
+ QToolButton *zoomMinusButton;
+
KPopupMenu *cameraMediaList;
KAccel *accelerators;
--- trunk/extragear/graphics/digikam/digikam/digikamui.rc #652121:652122
@ -1,5 +1,5 @
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui version="22" name="digikam" >
+<kpartgui version="23" name="digikam" >
<MenuBar>
@ -123,9 +123,6 @
<Action name="image_edit" />
<Action name="image_rename" />
<Separator/>
- <Action name="album_zoomin" />
- <Action name="album_zoomout" />
- <Separator/>
<Action name="full_screen" />
<Action name="slideshow" />
</ToolBar>
More information about the Digikam-devel
mailing list