[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: yup,
From:       Mirko Stocker <me () misto ! ch>
Date:       2007-06-26 22:00:47
Message-ID: 200706270000.52763.me () misto ! ch
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


On Tuesday 26 June 2007 17:12:53 Matthew Woehlke wrote:
> Indeed. Feel free to post patches here for review, I'm happy to take a
> look at anything else you find :-). (I'm not very familiar with kate's
> highlighting code either :-).)
>
> Oh, FYI I think I figured out what the 'normal text color' problem is...
> it's actually using the color used to draw the static word wrap marker,
> and only when that's turned on (the problem doesn't appear if the static
> word wrap marker is not shown). So my guess is something is failing to
> reset the pen after drawing that, which would explain why sometimes the
> right color is used, and sometimes not.

I think I've fixed the normal color rendering, and I even know why it occured. 
The problem happens in KateHighlighting::doHighlight. At the moment we just 
return if noHl is set, but the original code used memset to clean out the 
attributes. My patch just sets the attributes to 0 and it works again :)

I was also trying to fix the other color issues with the highlighting, but I 
wasn't even able to find the code that actually draws the text with the 
color. Can somebody help me with that? In the meantime, I'll try to fix the 
color selection UI, the checkboxes are behaving quite strange there..

Regards

Mirko

["normal_highlight.patch" (text/x-diff)]

Index: syntax/katehighlight.cpp
===================================================================
--- syntax/katehighlight.cpp	(revision 680489)
+++ syntax/katehighlight.cpp	(working copy)
@@ -252,8 +252,10 @@
   textLine->clearAttributes ();
 
   // no hl set, nothing to do more than the above cleaning ;)
-  if (noHl)
+  if (noHl) {
+    textLine->addAttribute (0, textLine->length(), 0);
     return;
+  }
 
   // duplicate the ctx stack, only once !
   QVector<short> ctx (prevLine->ctxArray());
Index: TODO
===================================================================
--- TODO	(revision 680489)
+++ TODO	(working copy)
@@ -14,8 +14,6 @@
 * color issues
   * use color roles when they become available to initialize attributes
     -> this will probably fix bug 143606
-  * dsNormal using very wrong color ('border background'?!) as foreground most of \
                the time
-    -> by 4.0 please, this wreaks havoc on u7y/a11!!
 
 * text painted twice after clearing a selection (see \
http://permalink.gmane.org/gmane.comp.kde.devel.kwrite/12546)  


["signature.asc" (application/pgp-signature)]

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic