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:12 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:12 +0200
commite50482f994b6ebcce864a412111d376e99205cdb (patch)
treeff3192c6aaf213c4922521bed988e4ed4147f537 /app/wlib/mswlib/mswmsg.c
parentd3897ce090dbeb220ed2c782f095597e417cf3cc (diff)
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
Update upstream source from tag 'upstream/5.2.0Beta2.1'
Update to upstream version '5.2.0Beta2.1' with Debian dir 1576f25f4c1496abfed44af31ead67d32c7be650
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
}