mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
When scrolling a focussed board, inval everything. Otherwise border
cells scroll into the center drawn as border.
This commit is contained in:
parent
6ed6fe4976
commit
15acf8c8bb
1 changed files with 25 additions and 17 deletions
|
@ -1062,10 +1062,18 @@ static void
|
||||||
scrollIfCan( BoardCtxt* board )
|
scrollIfCan( BoardCtxt* board )
|
||||||
{
|
{
|
||||||
if ( board->yOffset != board->prevYScrollOffset ) {
|
if ( board->yOffset != board->prevYScrollOffset ) {
|
||||||
|
if ( board->focussed == OBJ_BOARD && !board->focusHasDived ) {
|
||||||
|
/* an edge case. Just brute force it. */
|
||||||
|
board_invalAllTiles( board );
|
||||||
|
} else {
|
||||||
XP_Rect scrollR = board->boardBounds;
|
XP_Rect scrollR = board->boardBounds;
|
||||||
XP_Bool scrolled;
|
XP_Bool scrolled;
|
||||||
XP_S16 dist;
|
XP_S16 dist;
|
||||||
|
|
||||||
|
/* If there's a focus-rect drawn on the board, we need to inval any
|
||||||
|
row of it that's going to get scrolled into the center since it
|
||||||
|
needs to be redrawn without the border. */
|
||||||
|
|
||||||
invalSelTradeWindow( board );
|
invalSelTradeWindow( board );
|
||||||
dist = (board->yOffset - board->prevYScrollOffset)
|
dist = (board->yOffset - board->prevYScrollOffset)
|
||||||
* board->boardVScale;
|
* board->boardVScale;
|
||||||
|
@ -1080,7 +1088,7 @@ scrollIfCan( BoardCtxt* board )
|
||||||
} else {
|
} else {
|
||||||
board_invalAll( board );
|
board_invalAll( board );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
board->prevYScrollOffset = board->yOffset;
|
board->prevYScrollOffset = board->yOffset;
|
||||||
}
|
}
|
||||||
} /* scrollIfCan */
|
} /* scrollIfCan */
|
||||||
|
|
Loading…
Reference in a new issue