summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/contactlistview.cpp8
-rw-r--r--microkde/kdeui/klistview.cpp3
-rw-r--r--microkde/kglobalsettings.cpp9
-rw-r--r--microkde/kglobalsettings.h1
4 files changed, 15 insertions, 6 deletions
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 09d9c03..9accf78 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -233,53 +233,53 @@ void ContactListViewItem::refresh()
int i = 0;
KABC::Field::List::ConstIterator it;
for( it = mFields.begin(); it != mFields.end(); ++it ) {
setText( i++, (*it)->value( mAddressee ) );
}
}
///////////////////////////////
// ContactListView
ContactListView::ContactListView(KAddressBookTableView *view,
KABC::AddressBook* /* doc */,
QWidget *parent,
const char *name )
: KListView( parent, name ),
pabWidget( view ),
oldColumn( 0 )
{
mFlagBlockKeyPressed = false;
mFlagKeyPressed = false;
mABackground = true;
mSingleLine = false;
mToolTips = true;
-#ifndef KAB_EMBEDDED
+
mAlternateColor = KGlobalSettings::alternateBackgroundColor();
-#else //KAB_EMBEDDED
- mAlternateColor = QColor(240, 240, 240);
-#endif //KAB_EMBEDDED
+
+
+
setAlternateBackgroundEnabled(mABackground);
setAcceptDrops( true );
viewport()->setAcceptDrops( true );
setAllColumnsShowFocus( true );
setShowSortIndicator(true);
setSelectionModeExt( KListView::Extended );
setDropVisualizer(false);
// setFrameStyle(QFrame::NoFrame);
//setLineWidth ( 0 );
//setMidLineWidth ( 0 );
//setMargin ( 0 );
#ifndef KAB_EMBEDDED
connect(this, SIGNAL(dropped(QDropEvent*)),
this, SLOT(itemDropped(QDropEvent*)));
#endif //KAB_EMBEDDED
new DynamicTip( this );
}
void ContactListView::printMe()
{
#ifdef DESKTOP_VERSION
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index 31e2053..25327aa 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -438,50 +438,49 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse
connect(&d->autoSelect, SIGNAL( timeout() ),
this, SLOT( slotAutoSelect() ) );
connect(&d->dragExpand, SIGNAL( timeout() ),
this, SLOT( slotDragExpand() ) );
// context menu handling
if (d->showContextMenusOnPress)
{
connect (this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)),
this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
}
else
{
connect (this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)),
this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int)));
}
connect (this, SIGNAL (menuShortCutPressed (KListView*, QListViewItem*)),
this, SLOT (emitContextMenu (KListView*, QListViewItem*)));
//qDebug("KListView::KListView make alternate color configurable");
-//US d->alternateBackground = KGlobalSettings::alternateBackgroundColor();
- d->alternateBackground = QColor(240, 240, 240);
+ d->alternateBackground = KGlobalSettings::alternateBackgroundColor();
}
KListView::~KListView()
{
delete d;
}
bool KListView::isExecuteArea( const QPoint& point )
{
if ( itemAt( point ) )
return isExecuteArea( point.x() );
return false;
}
bool KListView::isExecuteArea( int x )
{
if( allColumnsShowFocus() )
return true;
else {
int offset = 0;
int width = columnWidth( 0 );
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index b65ce66..92a2b48 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -37,41 +37,50 @@ QFont KGlobalSettings::generalMaxFont()
f.setPointSize( size );
return f;
}
QString KGlobalSettings::timeTrackerDir()
{
static QString dir;
if ( dir.isEmpty() ) {
dir = locateLocal( "data", "timetrackerdir/d.ttl" );
dir = dir.left ( dir.length() - 5);
}
return dir;
}
QFont KGlobalSettings::toolBarFont()
{
return QApplication::font();
}
QColor KGlobalSettings::toolBarHighlightColor()
{
return QColor( "black" );
}
+QColor KGlobalSettings::alternateBackgroundColor()
+{
+#ifdef DESKTOP_VERSION
+ return QColor( 235, 235, 235 );
+#else
+ return QColor( 220, 220, 220 );
+#endif
+}
+
QRect KGlobalSettings::desktopGeometry( QWidget * )
{
return QApplication::desktop()->rect();
}
/**
* Returns whether KDE runs in single (default) or double click
* mode.
* see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
* @return true if single click mode, or false if double click mode.
**/
bool KGlobalSettings::singleClick()
{
KConfig *c = KGlobal::config();
KConfigGroupSaver cgs( c, "KDE" );
return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK);
}
diff --git a/microkde/kglobalsettings.h b/microkde/kglobalsettings.h
index 3eeda35..e2620b3 100644
--- a/microkde/kglobalsettings.h
+++ b/microkde/kglobalsettings.h
@@ -1,32 +1,33 @@
#ifndef MICROKDE_KGLOBALSETTINGS_H
#define MICROKDE_KGLOBALSETTINGS_H
#include <qfont.h>
#include <qrect.h>
#define KDE_DEFAULT_SINGLECLICK true
class KGlobalSettings
{
public:
static QFont generalFont();
static QFont generalMaxFont();
static QFont toolBarFont();
static QColor toolBarHighlightColor();
+ static QColor alternateBackgroundColor();
static QRect desktopGeometry( QWidget * );
static QString timeTrackerDir();
/**
* Returns whether KDE runs in single (default) or double click
* mode.
* see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
* @return true if single click mode, or false if double click mode.
**/
static bool singleClick();
};
#endif