|
With this patch, compilation with Qt 4.4.3 breaks because
QString::repeated was added in Qt 4.5. (used in next two commits as well). Michael -------- Original Message -------- Subject: extragear/graphics/digikam/imageplugins/freerotation Date: Fri, 02 Oct 2009 15:46:16 +0000 From: Andi Clemens <[hidden email]> Reply-To: [hidden email] To: [hidden email] SVN commit 1030575 by aclemens: Center the text and try to avoid icon movement. It still moves a little bit though. Isn't there a method to avoid icon re-positioning in QPushButtons? M +11 -1 freerotationtool.cpp --- trunk/extragear/graphics/digikam/imageplugins/freerotation/freerotationtool.cpp #1030574:1030575 @@ -470,13 +470,23 @@ QString FreeRotationTool::generateButtonLabel(const QPoint& p) { QString label = i18n("Click to set"); + int length = label.count(); if (pointIsValid(p)) { // label = QString("(%1, %2)") // .arg(p.x()) // .arg(p.y()); - label = i18nc("point has been set and is valid", "Ok"); + label = i18nc("point has been set and is valid", "Ok!"); + + // fill with additional whitespace, to match the original label length and center + // the text, without moving the button icon + int diff = qAbs<int>(length - label.count()); + + QString delimiter(" "); + int repeat = (diff / 2) + 1; + label.prepend(delimiter.repeated(repeat)); + label.append(delimiter.repeated(repeat)); } return label; } -- Michael Hansen - [hidden email] http://www.pfna.de/ _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
|
Oh how I hate that! :-)
Damn now I need to fiddle around again... Andi On Friday 02 October 2009 20:32:38 Michael G. Hansen wrote: > With this patch, compilation with Qt 4.4.3 breaks because > QString::repeated was added in Qt 4.5. (used in next two commits as well). > > Michael > > -------- Original Message -------- > Subject: extragear/graphics/digikam/imageplugins/freerotation > Date: Fri, 02 Oct 2009 15:46:16 +0000 > From: Andi Clemens <[hidden email]> > Reply-To: [hidden email] > To: [hidden email] > > SVN commit 1030575 by aclemens: > > Center the text and try to avoid icon movement. It still moves a little bit > though. Isn't there a method to avoid icon re-positioning in QPushButtons? > > M +11 -1 freerotationtool.cpp > > > --- > trunk/extragear/graphics/digikam/imageplugins/freerotation/freerotationtool > .cpp #1030574:1030575 > @@ -470,13 +470,23 @@ > QString FreeRotationTool::generateButtonLabel(const QPoint& p) > { > QString label = i18n("Click to set"); > + int length = label.count(); > > if (pointIsValid(p)) > { > // label = QString("(%1, %2)") > // .arg(p.x()) > // .arg(p.y()); > - label = i18nc("point has been set and is valid", "Ok"); > + label = i18nc("point has been set and is valid", "Ok!"); > + > + // fill with additional whitespace, to match the original label > length and center > + // the text, without moving the button icon > + int diff = qAbs<int>(length - label.count()); > + > + QString delimiter(" "); > + int repeat = (diff / 2) + 1; > + label.prepend(delimiter.repeated(repeat)); > + label.append(delimiter.repeated(repeat)); > } > return label; > } > Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
|
Should be fixed....
By the way: Any idea why my Map Search is completely empty now? Have you seen the message in digikam-devel? Andi On Friday 02 October 2009 20:39:57 Andi Clemens wrote: > Oh how I hate that! :-) > Damn now I need to fiddle around again... > > Andi > > On Friday 02 October 2009 20:32:38 Michael G. Hansen wrote: > > With this patch, compilation with Qt 4.4.3 breaks because > > QString::repeated was added in Qt 4.5. (used in next two commits as > > well). > > > > Michael > > > > -------- Original Message -------- > > Subject: extragear/graphics/digikam/imageplugins/freerotation > > Date: Fri, 02 Oct 2009 15:46:16 +0000 > > From: Andi Clemens <[hidden email]> > > Reply-To: [hidden email] > > To: [hidden email] > > > > SVN commit 1030575 by aclemens: > > > > Center the text and try to avoid icon movement. It still moves a little > > bit though. Isn't there a method to avoid icon re-positioning in > > QPushButtons? > > > > M +11 -1 freerotationtool.cpp > > > > > > --- > > trunk/extragear/graphics/digikam/imageplugins/freerotation/freerotationto > >ol .cpp #1030574:1030575 > > @@ -470,13 +470,23 @@ > > QString FreeRotationTool::generateButtonLabel(const QPoint& p) > > { > > QString label = i18n("Click to set"); > > + int length = label.count(); > > > > if (pointIsValid(p)) > > { > > // label = QString("(%1, %2)") > > // .arg(p.x()) > > // .arg(p.y()); > > - label = i18nc("point has been set and is valid", "Ok"); > > + label = i18nc("point has been set and is valid", "Ok!"); > > + > > + // fill with additional whitespace, to match the original label > > length and center > > + // the text, without moving the button icon > > + int diff = qAbs<int>(length - label.count()); > > + > > + QString delimiter(" "); > > + int repeat = (diff / 2) + 1; > > + label.prepend(delimiter.repeated(repeat)); > > + label.append(delimiter.repeated(repeat)); > > } > > return label; > > } > > _______________________________________________ > Digikam-devel mailing list > [hidden email] > https://mail.kde.org/mailman/listinfo/digikam-devel > Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
| Free forum by Nabble | Edit this page |
