40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
--- src/viewer/ircview.cpp 2010-07-01 15:04:28.000000000 +0200
|
|
+++ src/viewer/ircview.cpp-gil 2011-01-16 09:17:23.000000000 +0100
|
|
@@ -625,27 +625,27 @@
|
|
|
|
setVerticalScrollBarPolicy(Preferences::self()->showIRCViewScrollBar() ? Qt::ScrollBarAlwaysOn : Qt::ScrollBarAlwaysOff);
|
|
|
|
- QPalette p;
|
|
-
|
|
- p.setColor(QPalette::Base, Preferences::self()->color(Preferences::TextViewBackground));
|
|
-
|
|
if (Preferences::self()->showBackgroundImage())
|
|
{
|
|
KUrl url = Preferences::self()->backgroundImage();
|
|
|
|
- if (!url.isEmpty())
|
|
+ if (url.hasPath())
|
|
{
|
|
- QBrush brush;
|
|
-
|
|
- brush.setTexture(QPixmap(url.path()));
|
|
+ viewport()->setStyleSheet("QWidget { background-image: url("+url.path()+"); background-attachment:fixed; }");
|
|
|
|
- p.setBrush(QPalette::Base, brush);
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
+ if (!viewport()->styleSheet().isEmpty())
|
|
+ viewport()->setStyleSheet("");
|
|
+
|
|
+ QPalette p;
|
|
+ p.setColor(QPalette::Base, Preferences::self()->color(Preferences::TextViewBackground));
|
|
setPalette(p);
|
|
}
|
|
|
|
+
|
|
// Data insertion
|
|
|
|
void IRCView::append(const QString& nick, const QString& message)
|