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

List:       kfm-devel
Subject:    So, now what? was: Problems with inverted widget colors
From:       Michael Reiher <michael.reiher () gmx ! de>
Date:       2002-02-26 17:21:31
[Download RAW message or body]

Tach auch!

I recently sent in a message about problems with inverted widget colors which
makes many pages unreadable. But got no reaction so far. I know you're all
busy, but it would be nice if somebody knowing could have a look. The original
message can be found at:
http://lists.kde.org/?l=kfm-devel&m=101378282704073&w=2

I attached the patch again. And this is again the comment I wrote:

Ok, I digged around a bit in khtml. It resulted in the attached patch. Please
have a look.
  - it adds configurable defaults for standard text and background colors, 
    to be read from kdeglobals
  - which leeds to a fix for form elements to use the same foreground colors as
the rest KDE widgets
  - the location of reading the background setting is probably perfectly wrong,
but as I don't know the khtml internals please move it where it makes sence.

Greets

Michael
["khtml_default_colors.diff" (text/plain)]

Index: html/html_formimpl.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/html/html_formimpl.cpp,v
retrieving revision 1.256
diff -b -u -p -r1.256 html_formimpl.cpp
--- html/html_formimpl.cpp	2002/02/14 16:15:32	1.256
+++ html/html_formimpl.cpp	2002/02/16 17:58:28
@@ -970,7 +970,7 @@ void HTMLInputElementImpl::init()
     case PASSWORD:
     case ISINDEX:
     case FILE:
-        addCSSProperty(CSS_PROP_COLOR, "text");
+        addCSSProperty(CSS_PROP_COLOR, "windowtext");
         break;
     case SUBMIT:
     case RESET:
@@ -1557,7 +1557,7 @@ void HTMLSelectElementImpl::init()
 {
     HTMLGenericFormElementImpl::init();
 
-    addCSSProperty(CSS_PROP_COLOR, "text");
+    addCSSProperty(CSS_PROP_COLOR, "buttontext");
 
     if ( m_listItems.isEmpty() ) // ###
 	recalcListItems(); // useful if we already have contents (e.g. setInnerHTML instead \
of normal parsing) @@ -2039,7 +2039,7 @@ void HTMLTextAreaElementImpl::init()
 {
     HTMLGenericFormElementImpl::init();
 
-    addCSSProperty(CSS_PROP_COLOR, "text");
+    addCSSProperty(CSS_PROP_COLOR, "windowtext");
 }
 
 void HTMLTextAreaElementImpl::attach()
Index: misc/helper.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/misc/helper.cpp,v
retrieving revision 1.41
diff -b -u -p -r1.41 helper.cpp
--- misc/helper.cpp	2002/01/31 02:18:58	1.41
+++ misc/helper.cpp	2002/02/16 17:58:28
@@ -131,7 +131,7 @@ using namespace khtml;
         map["windowframe"] = globalConfig->readColorEntry( \
"windowBackground",&cg.background());  // WindowText
 	map["windowtext"] = globalConfig->readColorEntry( "windowForeground", &cg.text());
-        map["text"] = cg.text();
+        map["text"] = globalConfig->readColorEntry( "htmlForeground", &cg.text());;
 
         cg = kapp->palette().disabled();
 	globalConfig->setGroup("WM");
Index: rendering/render_html.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/rendering/render_html.cpp,v
retrieving revision 1.24
diff -b -u -p -r1.24 render_html.cpp
--- rendering/render_html.cpp	2002/01/14 19:56:45	1.24
+++ rendering/render_html.cpp	2002/02/16 17:58:28
@@ -26,6 +26,9 @@
 
 #include "khtmlview.h"
 
+#include <kglobal.h>
+#include <kapplication.h>
+#include <kconfig.h>
 #include <kdebug.h>
 
 using namespace khtml;
@@ -67,8 +70,11 @@ void RenderHtml::printBoxDecorations(QPa
 	    c = firstChild()->style()->backgroundColor();
 	if( !bg )
 	    bg = firstChild()->style()->backgroundImage();
-        if( !c.isValid() && root()->view())
-            c = root()->view()->palette().active().color(QColorGroup::Base);
+        if( !c.isValid() && root()->view()) {
+          KConfig *globalConfig = KGlobal::config();
+          globalConfig->setGroup("General");
+          c = globalConfig->readColorEntry( "htmlBackground", \
&root()->view()->palette().active().color(QColorGroup::Base)); +        }
     }
 
     int w = width();



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

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