|
发表于 2005-3-31 01:17:24
|
显示全部楼层
不知道到底是什么造成的,我找不到 baghira 中可疑的地方
不过,我实现了一个workaround,请打上这个 patch,给 skim:
[PHP]Index: scimstringrender.cpp
===================================================================
RCS file: /cvsroot/scim/skim/plugins/inputwindow/scimstringrender.cpp,v
retrieving revision 1.6
diff -u -r1.6 scimstringrender.cpp
--- scimstringrender.cpp 26 Mar 2005 19:20:51 -0000 1.6
+++ scimstringrender.cpp 30 Mar 2005 16:58:33 -0000
@@ -10,6 +10,7 @@
#include "scimstringrender.h"
#include <qwidget.h>
+#include <kapplication.h>
class ScimStringRenderPrivate
{
@@ -31,11 +32,15 @@
void ScimStringRender::drawString ( QPainter * p, const QRect & cr) const
{
-// QRect cr = contentsRect();
- static const QColorGroup& cg = d->parent->colorGroup();
+ //FIXME: should not be static here
+ static const QColorGroup& cg = KApplication::palette().active();
p->save();
- //it seems this fillrect is not needed, as Qt normally erases the widget's area
- p->fillRect(cr, cg.background());
+
+ QBrush bg = QBrush( d->parent->paletteBackgroundColor() );
+ if ( d->parent->paletteBackgroundPixmap() )
+ bg = QBrush( cg.background(), *(d->parent->paletteBackgroundPixmap()) );
+
+ p->fillRect( cr, bg );
if(d->attrs.size())
{[/PHP] |
|