don't use deprecated KGlobalSettings::xxxColor() methods anymore

svn path=/trunk/KDE/kdebase/apps/; revision=677660
This commit is contained in:
Peter Penz 2007-06-19 16:49:31 +00:00
parent 5926d0fddd
commit 2e6dc566dd
4 changed files with 27 additions and 26 deletions

View file

@ -28,10 +28,10 @@
#include <QTimer> #include <QTimer>
#include <QScrollBar> #include <QScrollBar>
#include <kcolorscheme.h>
#include <kdirmodel.h> #include <kdirmodel.h>
#include <kdirlister.h> #include <kdirlister.h>
#include <kfileitemdelegate.h> #include <kfileitemdelegate.h>
#include <kglobalsettings.h>
#include <klocale.h> #include <klocale.h>
#include <kiconeffect.h> #include <kiconeffect.h>
#include <kio/netaccess.h> #include <kio/netaccess.h>
@ -132,7 +132,7 @@ void DolphinView::setActive(bool active)
m_active = active; m_active = active;
QColor color = KGlobalSettings::baseColor(); QColor color = KColorScheme(KColorScheme::View).background();
if (active) { if (active) {
emit urlChanged(url()); emit urlChanged(url());
emit selectionChanged(selectedItems()); emit selectionChanged(selectedItems());

View file

@ -24,14 +24,14 @@
#include "dolphin_iconsmodesettings.h" #include "dolphin_iconsmodesettings.h"
#include <kglobalsettings.h> #include <kcolorscheme.h>
#include <klocale.h> #include <klocale.h>
#include <kvbox.h> #include <kvbox.h>
#include <QtGui/QGroupBox> #include <QGroupBox>
#include <QtGui/QLabel> #include <QLabel>
#include <QtGui/QSlider> #include <QSlider>
#include <QtGui/QBoxLayout> #include <QBoxLayout>
IconSizeDialog::IconSizeDialog(QWidget* parent) : IconSizeDialog::IconSizeDialog(QWidget* parent) :
KDialog(parent), KDialog(parent),
@ -59,7 +59,7 @@ IconSizeDialog::IconSizeDialog(QWidget* parent) :
// create 'Icon Size' group including slider and preview // create 'Icon Size' group including slider and preview
QGroupBox* iconSizeBox = new QGroupBox(i18n("Icon Size"), main); QGroupBox* iconSizeBox = new QGroupBox(i18n("Icon Size"), main);
const QColor iconBackgroundColor(KGlobalSettings::baseColor()); const QColor iconBackgroundColor = KColorScheme(KColorScheme::View).background();
KHBox* iconSizeHBox = new KHBox(iconSizeBox); KHBox* iconSizeHBox = new KHBox(iconSizeBox);
iconSizeHBox->setSpacing(spacing); iconSizeHBox->setSpacing(spacing);

View file

@ -20,18 +20,18 @@
#include "statusbarmessagelabel.h" #include "statusbarmessagelabel.h"
#include <kglobalsettings.h> #include <kcolorscheme.h>
#include <kcolorutils.h> #include <kcolorutils.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kicon.h> #include <kicon.h>
#include <klocale.h> #include <klocale.h>
#include <QtGui/QFontMetrics> #include <QFontMetrics>
#include <QtGui/QPainter> #include <QPainter>
#include <QtGui/QKeyEvent> #include <QKeyEvent>
#include <QtGui/QPushButton> #include <QPushButton>
#include <QtGui/QPixmap> #include <QPixmap>
#include <QtCore/QTimer> #include <QTimer>
StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) : StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) :
QWidget(parent), QWidget(parent),
@ -139,8 +139,8 @@ void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */)
QPainter painter(this); QPainter painter(this);
// draw background // draw background
QColor backgroundColor(palette().brush(QPalette::Background).color()); QColor backgroundColor = palette().brush(QPalette::Background).color();
QColor foregroundColor(KGlobalSettings::textColor()); QColor foregroundColor = KColorScheme(KColorScheme::View).foreground();
if (m_illumination > 0) { if (m_illumination > 0) {
// TODO: are there foreground and background colors available for // TODO: are there foreground and background colors available for
// "error messages"? // "error messages"?

View file

@ -20,16 +20,16 @@
#include "statusbarspaceinfo.h" #include "statusbarspaceinfo.h"
#include <QtCore/QTimer> #include <kcolorscheme.h>
#include <QtGui/QPainter>
#include <QtGui/QKeyEvent>
#include <kglobalsettings.h>
#include <kdiskfreespace.h> #include <kdiskfreespace.h>
#include <kmountpoint.h> #include <kmountpoint.h>
#include <klocale.h> #include <klocale.h>
#include <kio/job.h> #include <kio/job.h>
#include <QTimer>
#include <QPainter>
#include <QKeyEvent>
StatusBarSpaceInfo::StatusBarSpaceInfo(QWidget* parent) : StatusBarSpaceInfo::StatusBarSpaceInfo(QWidget* parent) :
QWidget(parent), QWidget(parent),
m_gettingSize(false), m_gettingSize(false),
@ -75,7 +75,7 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
frameColor.setAlpha(128); frameColor.setAlpha(128);
painter.setPen(frameColor); painter.setPen(frameColor);
const QColor backgrColor = KGlobalSettings::baseColor(); const QColor backgrColor = KColorScheme(KColorScheme::View).background();
painter.setBrush(backgrColor); painter.setBrush(backgrColor);
painter.drawRect(QRect(0, barTop + 1 , barWidth - widthDec, barHeight)); painter.drawRect(QRect(0, barTop + 1 , barWidth - widthDec, barHeight));
@ -104,7 +104,7 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
} }
// draw text // draw text
painter.setPen(KGlobalSettings::textColor()); painter.setPen(KColorScheme(KColorScheme::View).foreground());
painter.drawText(QRect(1, 1, barWidth - 2, barHeight + 6), painter.drawText(QRect(1, 1, barWidth - 2, barHeight + 6),
Qt::AlignCenter | Qt::TextWordWrap, Qt::AlignCenter | Qt::TextWordWrap,
text); text);
@ -138,8 +138,9 @@ void StatusBarSpaceInfo::refresh()
m_kBAvailable = 0; m_kBAvailable = 0;
// KDiskFreeSpace is for local paths only // KDiskFreeSpace is for local paths only
if (!m_url.isLocalFile()) if (!m_url.isLocalFile()) {
return; return;
}
m_gettingSize = true; m_gettingSize = true;
KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(m_url.path()); KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(m_url.path());
@ -163,7 +164,7 @@ void StatusBarSpaceInfo::refresh()
QColor StatusBarSpaceInfo::progressColor(const QColor& bgColor) const QColor StatusBarSpaceInfo::progressColor(const QColor& bgColor) const
{ {
QColor color = KGlobalSettings::buttonBackground(); QColor color = KColorScheme(KColorScheme::Button).background();
// assure that enough contrast is given between the background color // assure that enough contrast is given between the background color
// and the progressbar color // and the progressbar color