diff --git a/ui/minibar.cpp b/ui/minibar.cpp index f831176bb..5bb0ac50a 100644 --- a/ui/minibar.cpp +++ b/ui/minibar.cpp @@ -412,7 +412,7 @@ void ProgressWidget::paintEvent( QPaintEvent * e ) p.fillRect( fRect, pal.color( QPalette::Active, QPalette::Highlight ) ); if ( l && l != w ) { - p.setPen( pal.color( QPalette::Active, QPalette::Highlight ).dark( 120 ) ); + p.setPen( pal.color( QPalette::Active, QPalette::Highlight ).darker( 120 ) ); int delta = QApplication::isRightToLeft() ? w - l : l; p.drawLine( delta, 0, delta, h ); } @@ -540,7 +540,7 @@ void PagesEdit::updatePalette() if ( hasFocus() ) pal.setColor( QPalette::Active, QPalette::Base, QApplication::palette().color( QPalette::Active, QPalette::Base ) ); else - pal.setColor( QPalette::Base, QApplication::palette().color( QPalette::Base ).dark( 102 ) ); + pal.setColor( QPalette::Base, QApplication::palette().color( QPalette::Base ).darker( 102 ) ); setPalette( pal ); } diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 74f5099e0..18a2bf9ff 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -1740,7 +1740,7 @@ void PageView::paintEvent(QPaintEvent *pe) (blendRect.left() - contentsRect.left()) * devicePixelRatioF(), (blendRect.top() - contentsRect.top()) * devicePixelRatioF(), blendRect.width() * devicePixelRatioF(), blendRect.height() * devicePixelRatioF() ); - QColor blCol = selBlendColor.dark( 140 ); + QColor blCol = selBlendColor.darker( 140 ); blCol.setAlphaF( 0.2 ); p.fillRect( blendedPixmap.rect(), blCol ); p.end(); @@ -1772,7 +1772,7 @@ void PageView::paintEvent(QPaintEvent *pe) (blendRect.left() - contentsRect.left()) * devicePixelRatioF(), (blendRect.top() - contentsRect.top()) * devicePixelRatioF(), blendRect.width() * devicePixelRatioF(), blendRect.height() * devicePixelRatioF() ); - QColor blCol = d->mouseSelectionColor.dark( 140 ); + QColor blCol = d->mouseSelectionColor.darker( 140 ); blCol.setAlphaF( 0.2 ); p.fillRect( blendedPixmap.rect(), blCol ); p.end(); @@ -1810,7 +1810,7 @@ void PageView::paintEvent(QPaintEvent *pe) if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) && !selectionRectInternal.contains( contentsRect ) ) { - screenPainter.setPen( palette().color( QPalette::Active, QPalette::Highlight ).dark(110) ); + screenPainter.setPen( palette().color( QPalette::Active, QPalette::Highlight ).darker(110) ); screenPainter.drawRect( selectionRect ); } // 2b) Layer 1b: paint opaque selection (table) @@ -1822,7 +1822,7 @@ void PageView::paintEvent(QPaintEvent *pe) if ( !selectionPartRect.isNull() && selectionPartRect.intersects( contentsRect ) && !selectionPartRectInternal.contains( contentsRect ) ) { - screenPainter.setPen( palette().color( QPalette::Active, QPalette::Highlight ).dark(110) ); + screenPainter.setPen( palette().color( QPalette::Active, QPalette::Highlight ).darker(110) ); screenPainter.drawRect( selectionPartRect ); } } @@ -1846,7 +1846,7 @@ void PageView::paintEvent(QPaintEvent *pe) void PageView::drawTableDividers(QPainter * screenPainter) { if (!d->tableSelectionParts.isEmpty()) { - screenPainter->setPen( d->mouseSelectionColor.dark() ); + screenPainter->setPen( d->mouseSelectionColor.darker() ); if (d->tableDividersGuessed) { QPen p = screenPainter->pen(); p.setStyle( Qt::DashLine ); @@ -2208,7 +2208,7 @@ void PageView::mouseMoveEvent( QMouseEvent * e ) d->aPrevAction = d->aMouseNormal; d->aMouseSelect->trigger(); QPoint newPos = eventPos + QPoint( deltaX, deltaY ); - selectionStart( newPos, palette().color( QPalette::Active, QPalette::Highlight ).light( 120 ), false ); + selectionStart( newPos, palette().color( QPalette::Active, QPalette::Highlight ).lighter( 120 ), false ); updateSelection( eventPos ); break; } @@ -2382,7 +2382,7 @@ void PageView::mousePressEvent( QMouseEvent * e ) case Okular::Settings::EnumMouseMode::TrimSelect: if ( leftButton ) { - selectionStart( eventPos, palette().color( QPalette::Active, QPalette::Highlight ).light( 120 ), false ); + selectionStart( eventPos, palette().color( QPalette::Active, QPalette::Highlight ).lighter( 120 ), false ); } break; case Okular::Settings::EnumMouseMode::TableSelect: @@ -2390,7 +2390,7 @@ void PageView::mousePressEvent( QMouseEvent * e ) { if (d->tableSelectionParts.isEmpty()) { - selectionStart( eventPos, palette().color( QPalette::Active, QPalette::Highlight ).light( 120 ), false ); + selectionStart( eventPos, palette().color( QPalette::Active, QPalette::Highlight ).lighter( 120 ), false ); } else { QRect updatedRect; foreach (const TableSelectionPart &tsp, d->tableSelectionParts) { diff --git a/ui/pageviewannotator.cpp b/ui/pageviewannotator.cpp index 6c957e70a..4faa16649 100644 --- a/ui/pageviewannotator.cpp +++ b/ui/pageviewannotator.cpp @@ -407,7 +407,7 @@ class PolyLineEngine : public AnnotatorEngine const Okular::NormalizedPoint second = points[1]; // draw a semitransparent block around the 2 points painter->setPen( m_engineColor ); - painter->setBrush( QBrush( m_engineColor.light(), Qt::Dense4Pattern ) ); + painter->setBrush( QBrush( m_engineColor.lighter(), Qt::Dense4Pattern ) ); painter->drawRect( (int)(first.x * (double)xScale), (int)(first.y * (double)yScale), (int)((second.x - first.x) * (double)xScale), (int)((second.y - first.y) * (double)yScale) ); } diff --git a/ui/pageviewutils.cpp b/ui/pageviewutils.cpp index dc487ed62..d88a37248 100644 --- a/ui/pageviewutils.cpp +++ b/ui/pageviewutils.cpp @@ -412,7 +412,7 @@ void PageViewMessage::paintEvent( QPaintEvent * /* e */ ) const int textDrawingFlags = Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap; // draw shadow and text - painter.setPen( palette().color( QPalette::Window ).dark( 115 ) ); + painter.setPen( palette().color( QPalette::Window ).darker( 115 ) ); painter.drawText( xStartPoint + shadowOffset, yStartPoint + shadowOffset, textRect.width(), textRect.height(), textDrawingFlags, m_message ); if ( !m_details.isEmpty() ) painter.drawText( xStartPoint + shadowOffset, yStartPoint + textRect.height() + m_lineSpacing + shadowOffset, textRect.width(), detailsRect.height(), textDrawingFlags, m_details ); diff --git a/ui/sidebar.cpp b/ui/sidebar.cpp index 0e1d34e5c..128d889b1 100644 --- a/ui/sidebar.cpp +++ b/ui/sidebar.cpp @@ -150,7 +150,7 @@ void SidebarDelegate::paint( QPainter *painter, const QStyleOptionViewItem &opti } else if ( option.state & QStyle::State_MouseOver ) { - backBrush = m_selectionBackground->brush(option.palette).color().light( 115 ); + backBrush = m_selectionBackground->brush(option.palette).color().lighter( 115 ); foreColor = m_windowForeground->brush(option.palette).color(); hover = true; } @@ -167,7 +167,7 @@ void SidebarDelegate::paint( QPainter *painter, const QStyleOptionViewItem &opti { Qt::BrushStyle bs = opt.backgroundBrush.style(); if ( bs > Qt::NoBrush && bs < Qt::TexturePattern ) - opt.backgroundBrush = opt.backgroundBrush.color().light( 115 ); + opt.backgroundBrush = opt.backgroundBrush.color().lighter( 115 ); else opt.backgroundBrush = backBrush; }