[okular] [Bug 384267] Found text (ctrl-f) highlight color should use System Settings "selection background" color, not be hard-coded yellow

Albert Astals Cid bugzilla_noreply at kde.org
Fri Sep 1 22:21:05 UTC 2017


https://bugs.kde.org/show_bug.cgi?id=384267

--- Comment #6 from Albert Astals Cid <aacid at kde.org> ---
(In reply to Oliver Sander from comment #4)
> True, I was going to send a patch for that.  Adding the border is now simply
> 
> diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp
> index 047220f95..94429af93 100644
> --- a/ui/pagepainter.cpp
> +++ b/ui/pagepainter.cpp
> @@ -385,6 +385,8 @@ void PagePainter::paintCroppedPageOnPainter( QPainter *
> destPainter, const Okula
>                  QPainter painter(&backImage);
>                 
> painter.setCompositionMode(QPainter::CompositionMode_Multiply);
>                  painter.fillRect(highlightRect, highlightColor);
> +                painter.setPen(Qt::black);
> +                painter.drawRect(highlightRect);
>              }
>          }
>          // 4B.4. paint annotations [COMPOSITED ONES]
> 
> I am not convinced that hard-wiring Qt::black is a good idea.  What is a
> good color?

Maybe try KColorUtils::darken ?
https://api.kde.org/frameworks/kguiaddons/html/namespaceKColorUtils.html#a11e97bbb394b7e619163c2cc6b9a513a

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list