#include "statusbarmessagelabel.h"
-#include <kglobalsettings.h>
+#include <kcolorscheme.h>
#include <kcolorutils.h>
#include <kiconloader.h>
#include <kicon.h>
#include <klocale.h>
-#include <QtGui/QFontMetrics>
-#include <QtGui/QPainter>
-#include <QtGui/QKeyEvent>
-#include <QtGui/QPushButton>
-#include <QtGui/QPixmap>
-#include <QtCore/QTimer>
+#include <QFontMetrics>
+#include <QPainter>
+#include <QKeyEvent>
+#include <QPushButton>
+#include <QPixmap>
+#include <QTimer>
StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) :
QWidget(parent),
m_timer(0),
m_closeButton(0)
{
- setMinimumHeight(K3Icon::SizeSmall);
+ setMinimumHeight(KIconLoader::SizeSmall);
QPalette palette;
palette.setColor(QPalette::Background, Qt::transparent);
connect(m_timer, SIGNAL(timeout()),
this, SLOT(timerDone()));
- m_closeButton = new QPushButton(i18n("Close"), this);
+ m_closeButton = new QPushButton(i18nc("@action:button", "Close"), this);
m_closeButton->hide();
connect(m_closeButton, SIGNAL(clicked()),
this, SLOT(closeErrorMessage()));
break;
case DolphinStatusBar::Error:
- iconName = "dialog-error";
m_timer->start(100);
m_state = Illuminate;
QPainter painter(this);
// draw background
- QColor backgroundColor(palette().brush(QPalette::Background).color());
- QColor foregroundColor(KGlobalSettings::textColor());
+ QColor backgroundColor = palette().brush(QPalette::Background).color();
+ QColor foregroundColor = KColorScheme(QPalette::Active, KColorScheme::View).foreground().color();
if (m_illumination > 0) {
// TODO: are there foreground and background colors available for
// "error messages"?