D7662: Draw a dark rectangle around highlighted search results

Albert Astals Cid noreply at phabricator.kde.org
Mon Sep 4 22:13:19 UTC 2017


aacid added a comment.


  In https://phabricator.kde.org/D7662#143055, @sander wrote:
  
  > > This applies to all highlights, i.e. text selection too, are you sure we want that?
  >
  > Are you sure we don't have that anyway?  I get a darker-blue rectangle around text selections even without the patch.
  
  
  You sure? This is with the patch http://i.imgur.com/MWf1HF6.png and this is without it http://i.imgur.com/c5cgb7L.png
  
  > 
  > 
  >> There's something weird going on with the drawing, i can easily get a bad state, see http://i.imgur.com/wDAQlcP.png which is https://ev.kde.org/reports/2017-en.pdf having searched for "a b c d e f " on the thumbnail bar in any word mode after scrolling up/down a few times.
  > 
  > I cannot reproduce this, but I have a vague idea of what could be the cause.  Does it go away if you surround the three new lines by
  > 
  >   painter.save();
  >   [patch]
  >   painter.restore();
  >    
  > 
  > ?
  
  No that doesn't help, i'd say the problem is that you're actually painting outside the box and thus things go bad, please double check, but for example, i searched for "e" on a document and without your patch the width of the highlight was 29 pixels, with your patch, it was 28 pixels of color + 2 pixels for the border, so there's 1 unaccounted for pixel that will break havoc with repaints.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D7662

To: sander, #okular
Cc: aacid, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20170904/89830a4b/attachment.html>


More information about the Okular-devel mailing list