Abdel a écrit :
Right now, I cannot compile with qt3, sorry. With my Qt4 port, there is
no flicker but I have tested this nonetheless with a different syntax:
viewport()->setAttribute(Qt::WA_OpaquePaintEvent);
The result is not good: all the "float buttons" (foot, figure, table,
etc) are black on black. The weird thing is that this behavior affects
also my previously compiled Qt3 version. I presume that floats are not
"painted" by the lyx core but use the background color instead, aren't
they? Apparently setting this attribute is propagated system wide by Qt4.
Silly me! This is because while testing the color preference panel I
inadvertently modified this background to black... ;-{
So forget what I said about system wide QT blablabla. IMO this simple
patch is very safe and it improves windows experience significantly.
With this change, Lyx-1.4.0 becomes usable for small to medium documents
under windows.
Abdel.
Index: QWorkArea.C
===================================================================
RCS file: /var/cvs/lyx/lyx-devel/src/frontends/qt2/QWorkArea.C,v
retrieving revision 1.29
diff -u -r1.29 QWorkArea.C
--- QWorkArea.C 18 Jul 2005 00:29:12 -0000 1.29
+++ QWorkArea.C 4 Jan 2006 11:52:18 -0000
@@ -57,7 +57,10 @@
content_->show();
- content_->setBackgroundColor(lcolorcache.get(LColor::background));
+ // It is said that this help reduce flicker
+ content_->setBackgroundMode(NoBackground);
+ // If we go back to a custom backgound call:
+ //
content_->setBackgroundColor(lcolorcache.get(LColor::background));
QHBoxLayout * vl = new QHBoxLayout(this);
vl->addWidget(content_, 5);