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

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/rendering
From:       Leo Savernik <l.savernik () aon ! at>
Date:       2006-09-14 9:17:53
Message-ID: 1158225473.746618.1076.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 584177 by savernik:

Consistency fix: In low contrast situations, use same selection color
inversion as NN4, Moz, and IE.


 M  +4 -5      render_text.cpp  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_text.cpp #584176:584177
@@ -223,11 +223,10 @@
 	// ### should be at most retrieved once per render text
 	QColor bg = khtml::retrieveBackgroundColor(text);
 	// It may happen that the contrast is -- well -- virtually non existent.
-	// In this case, simply invert the colors
-	if (!khtml::hasSufficientContrast(hbg, bg)) {
-	    hc = QColor(0xff-hc.red(),0xff-hc.green(),0xff-hc.blue());
-	    hbg = QColor(0xff-hbg.red(),0xff-hbg.green(),0xff-hbg.blue());
-	}/*end if*/
+	// In this case, simply swap the colors, thus in compliance with
+	// NN4 (win32 only), IE, and Mozilla.
+	if (!khtml::hasSufficientContrast(hbg, bg))
+	    qSwap(hc, hbg);
     }
 
     p->setPen(hc);
[prev in list] [next in list] [prev in thread] [next in thread] 

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