~ubuntu-branches/ubuntu/maverick/kdegraphics/maverick-proposed

« back to all changes in this revision

Viewing changes to gwenview/lib/crop/croptool.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-12-02 14:03:43 UTC
  • mfrom: (1.1.35 upstream)
  • Revision ID: james.westby@ubuntu.com-20091202140343-2732gbkj69g89arq
Tags: 4:4.3.80-0ubuntu1
* New upstream beta release:
  - Add build-depend on shared-desktop-ontologies for nepomuk integration
  - Bump .so versions for libkexiv, libkdcraw and libkipi
  - Update various .install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
331
331
        QRect imageRect = imageView()->rect();
332
332
 
333
333
        static const QColor outerColor  = QColor::fromHsvF(0, 0, 0, 0.5);
334
 
        static const QColor borderColor = QColor::fromHsvF(0, 0, 1.0, 0.66);
 
334
        // For some reason nothing gets drawn if borderColor is not fully opaque!
 
335
        //static const QColor borderColor = QColor::fromHsvF(0, 0, 1.0, 0.66);
 
336
        static const QColor borderColor = QColor::fromHsvF(0, 0, 1.0);
335
337
        static const QColor fillColor   = QColor::fromHsvF(0, 0, 0.75, 0.66);
336
338
 
337
339
        QRegion outerRegion = QRegion(imageRect) - QRegion(rect);
484
486
void CropTool::moveHudWidget() {
485
487
        const QPoint delta = d->mHudEndPos - d->mHudWidget->pos();
486
488
 
487
 
        const double distance = sqrt(pow(delta.x(), 2) + pow(delta.y(), 2));
 
489
        const double distance = sqrt(pow(double(delta.x()), 2) + pow(double(delta.y()), 2));
488
490
        QPoint pos;
489
491
        if (distance > double(HUD_TIMER_MAX_PIXELS_PER_UPDATE)) {
490
492
                pos = d->mHudWidget->pos() + delta * double(HUD_TIMER_MAX_PIXELS_PER_UPDATE) / distance;