summaryrefslogtreecommitdiff
path: root/atari/statusbar.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2011-02-05 14:28:39 +0000
committerOle Loots <ole@monochrom.net>2011-02-05 14:28:39 +0000
commitfb38ee381cb3d94c3f7128befaa510bd879de987 (patch)
treefaeaf1304150c02d6c6e328b6d2f5b939ade0ee1 /atari/statusbar.c
parent2886ee6386b10a4a91d4872fc1ff1c31acc7c5b7 (diff)
downloadnetsurf-fb38ee381cb3d94c3f7128befaa510bd879de987.tar.gz
netsurf-fb38ee381cb3d94c3f7128befaa510bd879de987.tar.bz2
Improved redraw
svn path=/trunk/netsurf/; revision=11617
Diffstat (limited to 'atari/statusbar.c')
-rwxr-xr-xatari/statusbar.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/atari/statusbar.c b/atari/statusbar.c
index 84a9a8959..85c483b71 100755
--- a/atari/statusbar.c
+++ b/atari/statusbar.c
@@ -111,24 +111,26 @@ void __CDECL evnt_sb_redraw( COMPONENT *c, long buff[8] )
short curx;
short vqw[4];
char t[2];
- short cw = 0;
+ short cw = 8;
t[1]=0;
if( atari_sysinfo.sfont_monospaced ) {
- vqt_width( vdih, t[0], &vqw[0], &vqw[1], &vqw[2] );
+ t[0]='A';
+ int r = vqt_width( vdih, t[0], &vqw[0], &vqw[1], &vqw[2] );
cw = vqw[0];
}
vswr_mode( vdih, MD_TRANS );
- for( curx = work.g_x + 2, i=0 ; (curx < lclip.g_x + lclip.g_w) && i < sb->textlen; i++ ){
- if( curx >= lclip.g_x ) {
- t[0] = sb->text[i];
+ for( curx = work.g_x + 2, i=0 ; (curx+cw < work.g_x+work.g_w ) && i < sb->textlen; i++ ){
+ t[0] = sb->text[i];
+ if( !atari_sysinfo.sfont_monospaced ) {
+ vqt_width( vdih, t[0], &vqw[0], &vqw[1], &vqw[2] );
+ cw = vqw[0];
+ }
+ if( curx >= lclip.g_x - cw ) {
v_gtext( vdih, curx, work.g_y + 5, (char*)&t );
- if( !atari_sysinfo.sfont_monospaced ) {
- vqt_width( vdih, t[0], &vqw[0], &vqw[1], &vqw[2] );
- curx += vqw[0];
- } else {
- curx += cw;
- }
}
+ curx += cw;
+ if( curx >= lclip.g_x + lclip.g_w )
+ break;
}
}
vswr_mode( vdih, MD_REPLACE );