[Konversation-devel] [Bug 224033] Background image redrawing issues on scroll
Eike Hein
hein at kde.org
Sat Sep 11 09:02:38 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=224033
Eike Hein <hein at kde.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Eike Hein <hein kde org> 2010-09-11 09:02:34 ---
commit 01e0349a8e6ee2d1ed6bfa81daaaa5ecdb77f7b4
Author: Eike Hein <hein at kde.org>
Date: Sat Sep 11 09:06:06 2010 +0200
Rejig ircview background image code.
Back to the stylesheet approach, but set it only on the
viewport. Plus better sanity checking on the wallpaper
path.
BUG:224033
diff --git a/ChangeLog b/ChangeLog
index dcf085d..82861d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -184,6 +184,8 @@ Changes since 1.3.1:
the connection status tab before the "Looking for server" message if the
DNS response was already cached.
* Added support for the 475 numeric (ERR_BADCHANNELKEY).
+* Rewrote chat text view wallpaper image support to avoid rendering pro-
+ blems some users were experiencing.
Changes from 1.3 to 1.3.1:
diff --git a/src/viewer/ircview.cpp b/src/viewer/ircview.cpp
index 33bf88b..5928ce6 100644
--- a/src/viewer/ircview.cpp
+++ b/src/viewer/ircview.cpp
@@ -557,26 +557,27 @@ void IRCView::updateAppearance()
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)
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Konversation-devel
mailing list