From 7bf3b1dd132402f49de92bec77fdab5c5e0302ea Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 11 Sep 2002 15:56:07 +0000 Subject: [PATCH] fix repaints etc. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5266 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 6 ++++++ src/frontends/qt2/QContentPane.C | 2 +- src/frontends/qt2/TODO | 5 ----- src/frontends/qt2/qscreen.C | 12 +++++++++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 202f133ee0..1fb061fedc 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,9 @@ +2002-09-11 John Levon + + * qscreen.C: use repaint() not update() for immediate change + + * QContentPane.C: warning fix + 2002-09-11 John Levon * qfont_metrics.C: fix button metrics diff --git a/src/frontends/qt2/QContentPane.C b/src/frontends/qt2/QContentPane.C index 99470f2187..1767f6a191 100644 --- a/src/frontends/qt2/QContentPane.C +++ b/src/frontends/qt2/QContentPane.C @@ -160,7 +160,7 @@ void QContentPane::mouseDoubleClickEvent(QMouseEvent * e) dc_event_ = double_click(e); // doubleClickInterval() is just too long. - QTimer::singleShot(QApplication::doubleClickInterval() / 1.5, + QTimer::singleShot(int(QApplication::doubleClickInterval() / 1.5), this, SLOT(doubleClickTimeout())); } diff --git a/src/frontends/qt2/TODO b/src/frontends/qt2/TODO index 31b5a45011..655ab28976 100644 --- a/src/frontends/qt2/TODO +++ b/src/frontends/qt2/TODO @@ -21,11 +21,6 @@ QCommandBuffer - fix !! I HATE Qt -QContentPane - - - figure out why a scroll doesn't update quickly, which leaves cursor artifacts - whilst holding down page down etc. - QDocument - implement me. Need MVC (Edwin is on this) diff --git a/src/frontends/qt2/qscreen.C b/src/frontends/qt2/qscreen.C index 28d8589e55..25ca534ea1 100644 --- a/src/frontends/qt2/qscreen.C +++ b/src/frontends/qt2/qscreen.C @@ -146,11 +146,17 @@ void QScreen::hideCursor() } -void QScreen::expose(int x, int y, int exp_width, int exp_height) +void QScreen::expose(int x, int y, int w, int h) { - lyxerr[Debug::GUI] << "expose " << exp_width << "x" << exp_height + lyxerr[Debug::GUI] << "expose " << w << "x" << h << "+" << x << "+" << y << endl; - owner_.getContent()->update(x, y, exp_width, exp_height); + + // if we're scrolling, we want immediate paint, otherwise not. + QWidget * content(owner_.getContent()); + if (content->width() == w && content->height() == h) + content->repaint(x, y, w, h); + else + content->update(x, y, w, h); }