mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
2001-12-03 Lars Gullik Bj�nnes <larsbj@birdstep.com>
* screen.C (topCursorVisible): scroll half a page when the cursor reached top of bottom of screen git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3135 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b720d576c0
commit
09ae774b49
@ -1,3 +1,8 @@
|
||||
2001-12-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* screen.C (topCursorVisible): scroll half a page when the cursor
|
||||
reached top of bottom of screen
|
||||
|
||||
2001-12-02 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* vspace.[Ch] (operator!=): add operator.
|
||||
|
16
src/screen.C
16
src/screen.C
@ -393,21 +393,25 @@ unsigned int LyXScreen::topCursorVisible(LyXText const * text)
|
||||
+ text->cursor.row()->height()
|
||||
- text->first >= owner.height()) {
|
||||
if (text->cursor.row()->height() < owner.height()
|
||||
&& text->cursor.row()->height() > owner.height() / 4)
|
||||
&& text->cursor.row()->height() > owner.height() / 4) {
|
||||
newtop = text->cursor.y()
|
||||
+ text->cursor.row()->height()
|
||||
- text->cursor.row()->baseline() - owner.height();
|
||||
else
|
||||
} else {
|
||||
// scroll down
|
||||
newtop = text->cursor.y()
|
||||
- 3 * owner.height() / 4; /* the scroll region must be so big!! */
|
||||
- owner.height() / 2; /* the scroll region must be so big!! */
|
||||
}
|
||||
|
||||
} else if (static_cast<int>((text->cursor.y()) - text->cursor.row()->baseline()) <
|
||||
text->first && text->first > 0)
|
||||
{
|
||||
if (text->cursor.row()->height() < owner.height()
|
||||
&& text->cursor.row()->height() > owner.height() / 4)
|
||||
&& text->cursor.row()->height() > owner.height() / 4) {
|
||||
newtop = text->cursor.y() - text->cursor.row()->baseline();
|
||||
else {
|
||||
newtop = text->cursor.y() - owner.height() / 4;
|
||||
} else {
|
||||
// scroll up
|
||||
newtop = text->cursor.y() - owner.height() / 2;
|
||||
newtop = min(newtop, int(text->first));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user