From 2009465999acb4fc1e24c75c7149d1a7a32c4d73 Mon Sep 17 00:00:00 2001 From: GamesTrap Date: Sun, 5 Mar 2023 02:01:04 +0100 Subject: [PATCH] Centered badge count when smaller than 10 --- src/win32_window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/win32_window.c b/src/win32_window.c index 0d26d2b5..b83aefc7 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1672,7 +1672,10 @@ HICON GenerateBadgeIcon(HWND hWnd, int count) SetBkMode(hdcMem, TRANSPARENT); //Make font background transparent //Draw numbers - TextOut(hdcMem, 0, 0, countWStr, lstrlen(countWStr)); + if (count < 10) + TextOut(hdcMem, 16 / 4, 0, countWStr, lstrlen(countWStr)); + else + TextOut(hdcMem, 0, 0, countWStr, lstrlen(countWStr)); SelectObject(hdc, hOldBitmap); hOldBitmap = NULL;