Changeset View
Changeset View
Standalone View
Standalone View
lib/crop/croptool.cpp
Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Line(s) | 264 | { | |||
---|---|---|---|---|---|
267 | QRect imageRect = imageView()->rect().toRect(); | 267 | QRect imageRect = imageView()->rect().toRect(); | ||
268 | 268 | | |||
269 | static const QColor outerColor = QColor::fromHsvF(0, 0, 0, 0.5); | 269 | static const QColor outerColor = QColor::fromHsvF(0, 0, 0, 0.5); | ||
270 | // For some reason nothing gets drawn if borderColor is not fully opaque! | 270 | // For some reason nothing gets drawn if borderColor is not fully opaque! | ||
271 | //static const QColor borderColor = QColor::fromHsvF(0, 0, 1.0, 0.66); | 271 | //static const QColor borderColor = QColor::fromHsvF(0, 0, 1.0, 0.66); | ||
272 | static const QColor borderColor = QColor::fromHsvF(0, 0, 1.0); | 272 | static const QColor borderColor = QColor::fromHsvF(0, 0, 1.0); | ||
273 | static const QColor fillColor = QColor::fromHsvF(0, 0, 0.75, 0.66); | 273 | static const QColor fillColor = QColor::fromHsvF(0, 0, 0.75, 0.66); | ||
274 | 274 | | |||
275 | QRegion outerRegion = QRegion(imageRect) - QRegion(rect); | 275 | QRegion outerRegion = QRegion(imageRect) - QRegion(rect); | ||
meven: Add const here | |||||
276 | Q_FOREACH(const QRect & outerRect, outerRegion.rects()) { | 276 | for (const QRect &outerRect : outerRegion) { | ||
277 | painter->fillRect(outerRect, outerColor); | 277 | painter->fillRect(outerRect, outerColor); | ||
278 | } | 278 | } | ||
279 | 279 | | |||
280 | painter->setPen(borderColor); | 280 | painter->setPen(borderColor); | ||
281 | 281 | | |||
282 | painter->drawRect(rect); | 282 | painter->drawRect(rect); | ||
283 | 283 | | |||
284 | if (d->mMovingHandle == CH_None) { | 284 | if (d->mMovingHandle == CH_None) { | ||
▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines |
Add const here