Summary: | Digikam Image Editor; Aspect Ratio Crop has no option to center the crop | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Jan Van Overbeke <iniminimo> |
Component: | Plugin-Editor-Crop | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | 0.7.1 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.5.0 | |
Attachments: | screenshot of aspect ratio crop tool from digikam 0.8.0 |
Description
Jan Van Overbeke
2005-06-05 10:01:15 UTC
SVN commit 422495 by cgilles: WISH 106828: digiKam aspect ratio crop image editor tool : add 2 new buttons to center selection on center width and center height of image. Need to create 2 small bitmaps to remplace "Center" text on buttons for polish dialog. CCMAIL: digikam-devel@lists.sourceforge.net CCBUGS: 106828 M +37 -11 imageplugins/imageeffect_ratiocrop.cpp M +11 -3 imageplugins/imageeffect_ratiocrop.h M +55 -14 libs/widgets/imageselectionwidget.cpp M +12 -3 libs/widgets/imageselectionwidget.h Gilles, Honetement, ceci etait mon tout premier usage de bugs.kde.org ... Il parait que mon wish etait deja rapportee, es-ce que je dois fermer cette rapport avec "RESOLVED" ? On 5 Jun 2005 16:48:31 -0000, Gilles Caulier <caulier.gilles@free.fr> wrote: [bugs.kde.org quoted mail] SVN commit 422680 by cgilles: WISH 106828 : digiKam Aspect Ratio Tool : add icon for width/height center buttons. Polish dialog layout. CCMAIL: digikam-devel@lists.sourceforge.net CCBUG: 106828 : M +13 -4 imageplugins/imageeffect_ratiocrop.cpp M +1 -1 imageplugins/pics/Makefile.am AM imageplugins/pics/centerheight.png AM imageplugins/pics/centerwidth.png M +0 -2 libs/widgets/imageselectionwidget.cpp --- branches/digikam/0.8-experimental/digikam/imageplugins/imageeffect_ratiocrop.cpp #422679:422680 @@ -42,6 +42,7 @@ #include <knuminput.h> #include <kapplication.h> #include <kconfig.h> +#include <kstandarddirs.h> // Digikam includes. @@ -102,8 +103,8 @@ topLayout->addMultiCellWidget(label, 1, 1, 0, 0); topLayout->addMultiCellWidget(m_ratioCB, 1, 1, 1, 1); - topLayout->addMultiCellWidget(label2, 1, 1, 3, 3); - topLayout->addMultiCellWidget(m_orientCB, 1, 1, 4, 4); + topLayout->addMultiCellWidget(label2, 1, 1, 2, 2); + topLayout->addMultiCellWidget(m_orientCB, 1, 1, 3, 4); QHBoxLayout* l2 = new QHBoxLayout((QWidget*)0, 1, 0); m_customLabel1 = new QLabel(i18n("Custom ratio:"), plainPage()); @@ -127,6 +128,8 @@ l2->addWidget( m_useRuleThirdLines ); topLayout->addMultiCellLayout(l2, 2, 2, 0, 4); + // ------------------------------------------------------------- + m_xInput = new KIntNumInput(plainPage()); QWhatsThis::add( m_xInput, i18n("<p>Set here the top left selection corner position for cropping.")); m_xInput->setLabel(i18n("X:"), AlignLeft|AlignVCenter); @@ -135,7 +138,10 @@ m_widthInput->setLabel(i18n("Width:"), AlignLeft|AlignVCenter); QWhatsThis::add( m_widthInput, i18n("<p>Set here the width selection for cropping.")); m_widthInput->setRange(10, m_imageSelectionWidget->getOriginalImageWidth(), 1, true); - m_centerWidth = new QPushButton(i18n("Center"), plainPage()); + m_centerWidth = new QPushButton(plainPage()); + KGlobal::dirs()->addResourceType("centerwidth", KGlobal::dirs()->kde_default("data") + "digikam/data"); + QString directory = KGlobal::dirs()->findResourceDir("centerwidth", "centerwidth.png"); + m_centerWidth->setPixmap( QPixmap( directory + "centerwidth.png" ) ); QWhatsThis::add( m_centerWidth, i18n("<p>Set width position to center.")); topLayout->addMultiCellWidget(m_xInput, 3, 3, 0, 1); topLayout->addMultiCellWidget(m_widthInput, 3, 3, 2, 3); @@ -149,7 +155,10 @@ m_heightInput->setLabel(i18n("Height:"), AlignLeft|AlignVCenter); QWhatsThis::add( m_heightInput, i18n("<p>Set here the height selection for cropping.")); m_heightInput->setRange(10, m_imageSelectionWidget->getOriginalImageHeight(), 1, true); - m_centerHeight = new QPushButton(i18n("Center"), plainPage()); + m_centerHeight = new QPushButton(plainPage()); + KGlobal::dirs()->addResourceType("centerheight", KGlobal::dirs()->kde_default("data") + "digikam/data"); + directory = KGlobal::dirs()->findResourceDir("centerheight", "centerheight.png"); + m_centerHeight->setPixmap( QPixmap( directory + "centerheight.png" ) ); QWhatsThis::add( m_centerHeight, i18n("<p>Set height position to center.")); topLayout->addMultiCellWidget(m_yInput, 4, 4, 0, 1); topLayout->addMultiCellWidget(m_heightInput, 4, 4, 2, 3); --- branches/digikam/0.8-experimental/digikam/imageplugins/pics/Makefile.am #422679:422680 @@ -1,4 +1,4 @@ imageplugincorepicsdir = $(kde_datadir)/digikam/data imageplugincorepics_DATA = browntone.png coldtone.png neutralbw.png platinum.png selenium.png sepia.png \ bwgreen.png bwred.png bwyellow.png bworange.png autolevels.png normalize.png \ - equalize.png stretchcontrast.png + equalize.png stretchcontrast.png centerwidth.png centerheight.png ** branches/digikam/0.8-experimental/digikam/imageplugins/pics/centerheight.png #property changes Name: svn:mime-type + application/octet-stream ** branches/digikam/0.8-experimental/digikam/imageplugins/pics/centerwidth.png #property changes Name: svn:mime-type + application/octet-stream --- branches/digikam/0.8-experimental/digikam/libs/widgets/imageselectionwidget.cpp #422679:422680 @@ -143,8 +143,6 @@ void ImageSelectionWidget::setCenterSelection(int centerType) { - localToRealRegion(); - switch (centerType) { case CenterWidth: Created attachment 11349 [details]
screenshot of aspect ratio crop tool from digikam 0.8.0
I have used this file to fix ratio crop tool. Please do not close this file until you have checked and tested the new implementation available on digiKam 0.8.0 experimental SVN folder. If a similar file is already opened in B.K.O, this is must be closed. No need to have 2 files about this subject. Note : please use always English here because B.K.O is a public area. Gilles Caulier Important notice : digiKam 0.8.0 experimental branch is just for testing, not yet for production. Please take a care if you want test current ratio crop tool implementation. Do not install it in a production computer ! Gilles Caulier My implementation work since a long time without problem. I close this file. Gilles Caulier |