Changeset View
Changeset View
Standalone View
Standalone View
ui/pagepainter.cpp
Show First 20 Lines • Show All 650 Lines • ▼ Show 20 Line(s) | 637 | */ | |||
---|---|---|---|---|---|
651 | { | 651 | { | ||
652 | // iterate over annotations and paint AText, AGeom, AStamp | 652 | // iterate over annotations and paint AText, AGeom, AStamp | ||
653 | QList< Okular::Annotation * >::const_iterator aIt = unbufferedAnnotations->constBegin(), aEnd = unbufferedAnnotations->constEnd(); | 653 | QList< Okular::Annotation * >::const_iterator aIt = unbufferedAnnotations->constBegin(), aEnd = unbufferedAnnotations->constEnd(); | ||
654 | for ( ; aIt != aEnd; ++aIt ) | 654 | for ( ; aIt != aEnd; ++aIt ) | ||
655 | { | 655 | { | ||
656 | Okular::Annotation * a = *aIt; | 656 | Okular::Annotation * a = *aIt; | ||
657 | 657 | | |||
658 | // honor opacity settings on supported types | 658 | // honor opacity settings on supported types | ||
659 | unsigned int opacity = (unsigned int)( 255.0 * a->style().opacity() ); | 659 | unsigned int opacity = (unsigned int)( a->style().color().alpha() * a->style().opacity() ); | ||
660 | // skip the annotation drawing if all the annotation is fully | 660 | // skip the annotation drawing if all the annotation is fully | ||
661 | // transparent, but not with text annotations | 661 | // transparent, but not with text annotations | ||
662 | if ( opacity <= 0 && a->subType() != Okular::Annotation::AText ) | 662 | if ( opacity <= 0 && a->subType() != Okular::Annotation::AText ) | ||
663 | continue; | 663 | continue; | ||
664 | 664 | | |||
665 | QColor acolor = a->style().color(); | 665 | QColor acolor = a->style().color(); | ||
666 | if ( !acolor.isValid() ) | 666 | if ( !acolor.isValid() ) | ||
667 | acolor = Qt::yellow; | 667 | acolor = Qt::yellow; | ||
▲ Show 20 Lines • Show All 336 Lines • Show Last 20 Lines |