------- 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=103645 ------- Additional Comments From caulier.gilles gmail com 2007-03-30 13:00 ------- SVN commit 648043 by cgilles: digikam from trunk : Image Editor canvas : - button from bottom/left corner of editor canvas used to handle pan icon widget, is now a toogle button. it show and hide pan icon view. No need to select a regio to pan to hide pan view. Just press again on the button. - pan icon view is just more larger (90*60) ==> (120*80). More adapted to large screen. CCBUGS: 103645 M +21 -8 canvas.cpp M +1 -1 canvas.h --- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/canvas.cpp #648042:648043 @ -164,6 +164,7 @ d->cornerButton = new QToolButton(this); d->cornerButton->setIconSet(SmallIcon("move")); + d->cornerButton->setToggleButton(true); d->cornerButton->hide(); setCornerWidget(d->cornerButton); @ -176,8 +177,8 @ connect(this, SIGNAL(signalZoomChanged(float)), this, SLOT(slotZoomChanged(float))); - connect(d->cornerButton, SIGNAL(clicked()), - this, SLOT(slotCornerButtonClicked())); + connect(d->cornerButton, SIGNAL(toggled(bool)), + this, SLOT(slotCornerButtonToggled(bool))); connect(d->im, SIGNAL(signalColorManagementTool()), this, SIGNAL(signalColorManagementTool())); @ -1208,16 +1209,26 @ emit signalChanged(); } -void Canvas::slotCornerButtonClicked() +void Canvas::slotCornerButtonToggled(bool on) { + if (!on) + { + if (d->panIconPopup) + { + d->panIconPopup->hide(); + delete d->panIconPopup; + d->panIconPopup = 0; + } + return; + } + if (!d->panIconPopup) { - d->panIconPopup = new KPopupFrame(this); - - ImagePanIconWidget *pan = new ImagePanIconWidget(90, 60, d->panIconPopup); + d->panIconPopup = new KPopupFrame(this); + ImagePanIconWidget *pan = new ImagePanIconWidget(120, 80, d->panIconPopup); d->panIconPopup->setMainWidget(pan); - QRect r((int)(contentsX() / d->zoom), (int)(contentsY() / d->zoom), + QRect r((int)(contentsX() / d->zoom), (int)(contentsY() / d->zoom), (int)(visibleWidth() / d->zoom), (int)(visibleHeight() / d->zoom)); pan->setRegionSelection(r); @ -1228,7 +1239,8 @ QPoint g = mapToGlobal(viewport()->pos()); g.setX(g.x()+ viewport()->size().width()); g.setY(g.y()+ viewport()->size().height()); - d->panIconPopup->popup(QPoint(g.x() - d->panIconPopup->width(), g.y() - d->panIconPopup->height())); + d->panIconPopup->popup(QPoint(g.x() - d->panIconPopup->width(), + g.y() - d->panIconPopup->height())); } void Canvas::slotPanIconSelectionMoved(QRect r, bool b) @ -1240,6 +1252,7 @ d->panIconPopup->hide(); delete d->panIconPopup; d->panIconPopup = 0; + d->cornerButton->setOn(false); } } --- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/canvas.h #648042:648043 @ -155,7 +155,7 @ void slotModified(); void slotImageLoaded(const QString& filePath, bool success); void slotImageSaved(const QString& filePath, bool success); - void slotCornerButtonClicked(); + void slotCornerButtonToggled(bool); void slotPanIconSelectionMoved(QRect, bool); void slotZoomChanged(float); _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |