Version: (using KDE KDE 3.5.6) Installed from: Unlisted Binary Package Compiler: GCC G++ 3.4.4 OS: Linux I have a lighter color set as my "selected background" in kcontrol, with black as the "Selected Text" color. However in kate, and any application that embeds it, white is used as the selected text color for "normal text". This makes it very difficult to see that text. If you're going to dictate the text colors, dictate the select background color too. The "current line" color appears to be a system color too.
Created attachment 20127 [details] Screenshot of the issue. Here's a screenshot of the selected text issue described above.
I'll confirm this because I know I've seen what Joseph is talking about. This should be an easy fix (if it isn't fixed in trunk already - if so, someone that knows it is can please close this :-)); don't use the system colors for the default background(s). Meanwhile, Joseph, I trust you've discovered how to change the colors?
Hi, I've got the inverse problem. Using a high contrast colour scheme (light grey text on dark blue background), Kate uses (for normal unselected text) my system background but doesn't use the system text colour. So I'm left with black text on a dark blue background (not easy to read). Should this be logged as its own bug?
> Should this be logged as its own bug? No, it's the same issue.
SVN commit 680364 by mwoehlke: CCBUG: 143606 Fix deprecation warnings (use KColorScheme), also use only colors from the system palette for defaults. This might fix one of the reports in bug 143606 but since changing the system color palette is completely broken right now, I can't check. TODO: something similar, for default attributes (which should complete the fixing of the bug). M +13 -8 kateconfig.cpp M +21 -13 kateschema.cpp M +2 -2 katestyletreewidget.cpp --- trunk/KDE/kdelibs/kate/utils/kateconfig.cpp #680363:680364 @@ -28,6 +28,7 @@ #include <kconfig.h> #include <kglobalsettings.h> +#include <kcolorscheme.h> #include <kcharsets.h> #include <klocale.h> #include <kfinddialog.h> @@ -1146,14 +1147,18 @@ KConfigGroup config = KateGlobal::self()->schemaManager()->schema(KateGlobal::self()->schemaManager()->number(schema)); - QColor tmp0 (KGlobalSettings::baseColor()); - QColor tmp1 (KGlobalSettings::highlightColor()); - QColor tmp2 (KGlobalSettings::alternateBackgroundColor()); - QColor tmp3 ( "#FFFF99" ); - QColor tmp4 (tmp2.dark()); - QColor tmp5 ( KGlobalSettings::inactiveTextColor().lighter(50) ); - QColor tmp6 ( "#EAE9E8" ); - QColor tmp7 ( "#000000" ); + // NOTE keep in sync with KateSchemaConfigColorTab::schemaChanged + KColorScheme schemeView(KColorScheme::View); + KColorScheme schemeWindow(KColorScheme::Window); + KColorScheme schemeSelection(KColorScheme::Selection); + QColor tmp0( schemeView.background().color() ); + QColor tmp1( schemeSelection.background().color() ); + QColor tmp2( schemeView.background(KColorScheme::AlternateBackground).color() ); + QColor tmp3( schemeView.shade(KColorScheme::LightShade) ); + QColor tmp4( schemeView.shade(KColorScheme::MidShade) ); + QColor tmp5( schemeView.shade(KColorScheme::MidlightShade) ); + QColor tmp6( schemeWindow.background().color() ); + QColor tmp7( schemeWindow.foreground().color() ); m_backgroundColor = config.readEntry("Color Background", tmp0); m_backgroundColorSet = true; --- trunk/KDE/kdelibs/kate/utils/kateschema.cpp #680363:680364 @@ -31,6 +31,7 @@ #include "ui_schemaconfigcolortab.h" +#include <kcolorscheme.h> #include <klocale.h> #include <kdialog.h> #include <kcolorbutton.h> @@ -122,7 +123,7 @@ void KateSchemaManager::addSchema (const QString &t) { - m_config.group(t).writeEntry("Color Background", KGlobalSettings::baseColor()); + m_config.group(t).writeEntry("Color Background", KColorScheme(KColorScheme::View).background().color()); update (false); } @@ -257,14 +258,18 @@ if ( ! m_schemas.contains( newSchema ) ) { // fallback defaults - QColor tmp0 (KGlobalSettings::baseColor()); - QColor tmp1 (KGlobalSettings::highlightColor()); - QColor tmp2 (KGlobalSettings::alternateBackgroundColor()); - QColor tmp3 ( "#FFFF99" ); - QColor tmp4 (tmp2.dark()); - QColor tmp5 ( KGlobalSettings::inactiveTextColor().lighter(50) ); - QColor tmp6 ( "#EAE9E8" ); - QColor tmp7 ( "#000000" ); + // NOTE keep in sync with KateRendererConfig::setSchemaInternal + KColorScheme schemeView(KColorScheme::View); + KColorScheme schemeWindow(KColorScheme::Window); + KColorScheme schemeSelection(KColorScheme::Selection); + QColor tmp0( schemeView.background().color() ); + QColor tmp1( schemeSelection.background().color() ); + QColor tmp2( schemeView.background(KColorScheme::AlternateBackground).color() ); + QColor tmp3( schemeView.shade(KColorScheme::LightShade) ); + QColor tmp4( schemeView.shade(KColorScheme::MidShade) ); + QColor tmp5( schemeView.shade(KColorScheme::MidlightShade) ); + QColor tmp6( schemeWindow.background().color() ); + QColor tmp7( schemeWindow.foreground().color() ); // same std colors like in KateDocument::markColor QVector <QColor> mark(KTextEditor::MarkInterface::reservedMarkersCount()); @@ -339,6 +344,9 @@ kDebug(13030)<<"Using config group "<<config.group()<<endl; SchemaColors c = it.value(); + // TODO - don't save if using defaults, so that changing the color scheme + // lets colors track the new scheme if they haven't been customized + // Although, KColorScheme should handle this eventually... config.writeEntry("Color Background", c.back); config.writeEntry("Color Selection", c.selected); config.writeEntry("Color Highlighted Line", c.current); @@ -485,11 +493,11 @@ // set colors QPalette p ( m_defaultStyles->palette() ); - QColor _c ( KGlobalSettings::baseColor() ); + QColor _c ( KColorScheme(KColorScheme::View).background().color() ); p.setColor( QPalette::Base, KateGlobal::self()->schemaManager()->schema(schema). readEntry( "Color Background", _c ) ); - _c = KGlobalSettings::highlightColor(); + _c = KColorScheme(KColorScheme::Selection).background().color(); p.setColor( QPalette::Highlight, KateGlobal::self()->schemaManager()->schema(schema). readEntry( "Color Selection", _c ) ); @@ -613,11 +621,11 @@ // TODO this reads of the KConfig object, which should be changed when // the color tab is fixed. QPalette p ( m_styles->palette() ); - QColor _c ( KGlobalSettings::baseColor() ); + QColor _c ( KColorScheme(KColorScheme::View).background().color() ); p.setColor( QPalette::Base, KateGlobal::self()->schemaManager()->schema(m_schema). readEntry( "Color Background", _c ) ); - _c = KGlobalSettings::highlightColor(); + _c = KColorScheme(KColorScheme::Selection).background().color(); p.setColor( QPalette::Highlight, KateGlobal::self()->schemaManager()->schema(m_schema). readEntry( "Color Selection", _c ) ); --- trunk/KDE/kdelibs/kate/utils/katestyletreewidget.cpp #680363:680364 @@ -27,7 +27,7 @@ #include <klocale.h> #include <kicon.h> -#include <kglobalsettings.h> +#include <kcolorscheme.h> #include <kmenu.h> #include <kmessagebox.h> #include <kcolordialog.h> @@ -137,7 +137,7 @@ headerItem()->setIcon(4, KIcon("format-text-strikethrough")); // grap the bg color, selected color and default font - normalcol = KGlobalSettings::textColor(); + normalcol = KColorScheme(KColorScheme::View).foreground().color(); bgcol = KateRendererConfig::global()->backgroundColor(); selcol = KateRendererConfig::global()->selectionColor(); docfont = KateRendererConfig::global()->font();
I think this is fixed in KDE 4.x