Centered badge count when smaller than 10

This commit is contained in:
GamesTrap 2023-03-05 02:01:04 +01:00
parent 5e8c055004
commit 2009465999
No known key found for this signature in database
GPG Key ID: 31DFD452434ECDA3

View File

@ -1672,7 +1672,10 @@ HICON GenerateBadgeIcon(HWND hWnd, int count)
SetBkMode(hdcMem, TRANSPARENT); //Make font background transparent SetBkMode(hdcMem, TRANSPARENT); //Make font background transparent
//Draw numbers //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); SelectObject(hdc, hOldBitmap);
hOldBitmap = NULL; hOldBitmap = NULL;