summaryrefslogtreecommitdiff
path: root/app/wlib/mswlib/mswmsg.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:00 +0200
commitb623f5953691b2a0614e6f1f4def86bdbb9a4113 (patch)
tree18102bd36f7e22eb2ba2b9f880e4cb29346f4cb8 /app/wlib/mswlib/mswmsg.c
parent359b557176b9bb2ff1aed2082641eed39c358d0d (diff)
New upstream version 5.2.0Beta2.1upstream/5.2.0Beta2.1upstream
Diffstat (limited to 'app/wlib/mswlib/mswmsg.c')
-rw-r--r--app/wlib/mswlib/mswmsg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/wlib/mswlib/mswmsg.c b/app/wlib/mswlib/mswmsg.c
index 4a21921..6445299 100644
--- a/app/wlib/mswlib/mswmsg.c
+++ b/app/wlib/mswlib/mswmsg.c
@@ -42,6 +42,7 @@ static void repaintMessage(
HFONT hFont;
LOGFONT msgFont;
double scale = 1.0;
+ TEXTMETRIC textMetrics;
hDc = GetDC( hWnd );
@@ -74,13 +75,15 @@ static void repaintMessage(
hFont = SelectObject( hDc, mswLabelFont );
}
+ GetTextMetrics(hDc, &textMetrics);
+
rect.bottom = (long)(bm->y+( bm->h ));
rect.right = (long)(bm->x+( scale * bm->w ));
- rect.top = bm->y;
+ rect.top = bm->y+1;
rect.left = bm->x;
SetBkColor( hDc, GetSysColor( COLOR_BTNFACE ) );
- ExtTextOut( hDc, bm->x, bm->y, ETO_CLIPPED|ETO_OPAQUE, &rect, bm->message, strlen( bm->message ), NULL );
+ ExtTextOut( hDc, bm->x, bm->y + ((bm->h + 2 - textMetrics.tmHeight) / 2), ETO_CLIPPED|ETO_OPAQUE, &rect, bm->message, strlen( bm->message ), NULL );
if( scale != 1.0 )
/* in case we did create a new font earlier, delete it now */
@@ -138,7 +141,7 @@ wPos_t wMessageGetHeight( long flags )
if( flags & BM_SMALL )
scale = SCALE_SMALL;
- return((wPos_t)((mswEditHeight - 4) * scale ));
+ return((wPos_t)((mswEditHeight) * scale ));
#endif
}