Commit 75c7d991 authored by Robert Knight's avatar Robert Knight
Browse files

Begin work on an accessible color scheme which uses the system-wide colors...

Begin work on an accessible color scheme which uses the system-wide colors provided by KColorScheme.  Changed the default color scheme to 'Linux' because (a) it was the most popular amongst users in the survey and (b) having used it for a couple of months in KDE 4 it is much more comfortable to use for long periods of use than the glare of a white background.  Updated TODOs with a few bugs that need fixing.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=690421
parent 35a7a587
......@@ -84,7 +84,6 @@ The KDE 4.0 TODO List:
== BUGS ==
- Shortcuts do not work when the menu bar is hidden.
- Allow the user to over-ride the "no Ctrl+[Key] shortcuts" limitation with shortcuts
......@@ -96,6 +95,13 @@ image. A more efficient solution such as buffering successive image size change
be better. This would also help with applications such as Midnight Commander which
do not always behave well with lots of successive image size changes.
- Toggling the taglist in the Vim 7 taglist plugin causes the screen to resize to a smaller number of columns
- Scrolling the display with filters active does not clear or update the filters.
- It is not clear to some users how the 'Show in Menu' (favorites) features works,
plus the default Shell profile is not marked as a favorite by default
== DOCUMENTATION ==
- Re-write the handbook contents to be up to date with the new user interface
......
......@@ -5,7 +5,7 @@ LocalTabTitleFormat=%d : %n
RemoteTabTitleFormat=%h : %u
[Appearence]
ColorScheme= BlackOnWhite
ColorScheme=Linux
[Scrolling]
ScrollMode=FixedLineCount
......
......@@ -23,10 +23,12 @@
#include "ColorScheme.h"
// Qt
#include <QtGui/QBrush>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
// KDE
#include <KColorScheme>
#include <KConfig>
#include <KLocale>
#include <KStandardDirs>
......@@ -309,6 +311,68 @@ void ColorScheme::writeColorEntry(KConfig& config , const QString& colorName, co
configGroup.writeEntry("Bold",(bool)entry.bold);
}
//
// Work In Progress - A color scheme for use on KDE setups for users
// with visual disabilities which means that they may have trouble
// reading text with the supplied color schemes.
//
// This color scheme uses only the 'safe' colors defined by the
// KColorScheme class.
//
// A complication this introduces is that each color provided by
// KColorScheme is defined as a 'background' or 'foreground' color.
// Only foreground colors are allowed to be used to render text and
// only background colors are allowed to be used for backgrounds.
//
// The ColorEntry and TerminalDisplay classes do not currently
// support this restriction.
//
// Requirements:
// - A color scheme which uses only colors from the KColorScheme class
// - Ability to restrict which colors the TerminalDisplay widget
// uses as foreground and background color
// - Make use of KGlobalSettings::allowDefaultBackgroundImages() as
// a hint to determine whether this accessible color scheme should
// be used by default.
//
//
// -- Robert Knight <robertknight@gmail.com> 21/07/2007
//
AccessibleColorScheme::AccessibleColorScheme()
: ColorScheme()
{
// basic attributes
setName("accessible");
setDescription(i18n("Accessible Color Scheme"));
// setup colors
const int ColorRoleCount = 8;
const KColorScheme colorScheme;
QBrush colors[ColorRoleCount] =
{
colorScheme.foreground( colorScheme.NormalText ),
colorScheme.background( colorScheme.NormalBackground ),
colorScheme.foreground( colorScheme.InactiveText ),
colorScheme.foreground( colorScheme.ActiveText ),
colorScheme.foreground( colorScheme.LinkText ),
colorScheme.foreground( colorScheme.VisitedText ),
colorScheme.foreground( colorScheme.NegativeText ),
colorScheme.foreground( colorScheme.NeutralText )
};
for ( int i = 0 ; i < TABLE_COLORS ; i++ )
{
ColorEntry entry;
entry.color = colors[ i % ColorRoleCount ].color();
setColorTableEntry( i , entry );
}
}
KDE3ColorSchemeReader::KDE3ColorSchemeReader( QIODevice* device ) :
_device(device)
{
......
......@@ -187,6 +187,18 @@ private:
static const ColorEntry defaultTable[]; // table of default color entries
};
/**
* A color scheme which uses colors from the standard KDE color palette.
*
* This is designed primarily for the benefit of users who are using specially
* designed colors.
*/
class AccessibleColorScheme : public ColorScheme
{
public:
AccessibleColorScheme();
};
/**
* Reads a color scheme stored in the .schema format used in the KDE 3 incarnation
* of Konsole
......
......@@ -124,7 +124,7 @@ FallbackProfile::FallbackProfile()
setProperty(KeyBindings,"default");
setProperty(ColorScheme,"Linux");
setProperty(Font,QFont("Monospace"));
setProperty(HistoryMode,FixedSizeHistory);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment