On Wed, Nov 16, 2005 at 12:39:30PM +0100, Jean-Marc Lasgouttes wrote: > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> Agree. This is as good as it gets for 1.4. > > Martin> I propose to check this in, with perhaps a FIXME added to the > Martin> effect that we're cheating here. > > OK. > > JMarc
It's in. Next is the bug that scrolling is irregular/too fast. If bugzilla were working, I could tell you what number :-( Ah, it's probably 822. If bugzilla were up, you could do something with this info :-( Heck, I'll just attach it. - Martin
Index: QContentPane.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QContentPane.C,v retrieving revision 1.36 diff -u -p -r1.36 QContentPane.C --- QContentPane.C 7 Oct 2005 12:00:41 -0000 1.36 +++ QContentPane.C 12 Nov 2005 19:49:56 -0000 @@ -75,8 +75,11 @@ mouse_button::state q_motion_state(Qt::B } // namespace anon +// This is a 'heartbeat' generating synthetic mouse move events when the +// cursor is at the top or bottom edge of the viewport. One page scroll per +// 0.5 s is about right for eye-hand control by humans SyntheticMouseEvent::SyntheticMouseEvent() - : timeout(200), restart_timeout(true), + : timeout(500), restart_timeout(true), x_old(-1), y_old(-1), scrollbar_value_old(-1.0) {} @@ -195,11 +198,18 @@ void QContentPane::mouseReleaseEvent(QMo void QContentPane::mouseMoveEvent(QMouseEvent * e) { - FuncRequest const cmd(LFUN_MOUSE_MOTION, e->x(), e->y(), + FuncRequest cmd(LFUN_MOUSE_MOTION, e->x(), e->y(), q_motion_state(e->state())); // If we're above or below the work area... - if (e->y() <= 0 || e->y() >= height()) { + if (e->y() <= 20 || e->y() >= height() - 20) { + // Make sure only a synthetic event can cause a page scroll, + // so they come at a steady rate: + if (e->y() <= 20) + // _Force_ a scroll up: + cmd.y = -40; + else + cmd.y = height(); // Store the event, to be handled when the timeout expires. synthetic_mouse_event_.cmd = cmd;
pgp3E0pseTN2v.pgp
Description: PGP signature