mirror of
https://github.com/reactos/reactos.git
synced 2025-02-21 16:04:57 +00:00
[EXPLORER] Center the text of the clock
CTrayClockWnd: Fix the calculation that centered the text of the clock. CTrayNotifyWnd: Restore the 1 pixel margin between the clock and the pager.
This commit is contained in:
parent
c109dc9f24
commit
d11e7af5f2
2 changed files with 2 additions and 5 deletions
|
@ -534,9 +534,7 @@ LRESULT CTrayClockWnd::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
|||
|
||||
hPrevFont = (HFONT) SelectObject(hDC, hFont);
|
||||
|
||||
rcClient.left = (rcClient.right / 2) - (CurrentSize.cx / 2);
|
||||
rcClient.top = (rcClient.bottom / 2) - (CurrentSize.cy / 2);
|
||||
rcClient.right = rcClient.left + CurrentSize.cx;
|
||||
rcClient.bottom = rcClient.top + CurrentSize.cy;
|
||||
|
||||
for (i = 0, line = 0;
|
||||
|
@ -546,8 +544,7 @@ LRESULT CTrayClockWnd::OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
|||
if (LineSizes[i].cx != 0)
|
||||
{
|
||||
TextOut(hDC,
|
||||
rcClient.left + (CurrentSize.cx / 2) - (LineSizes[i].cx / 2) +
|
||||
TRAY_CLOCK_WND_SPACING_X,
|
||||
(rcClient.right - LineSizes[i].cx) / 2,
|
||||
rcClient.top + TRAY_CLOCK_WND_SPACING_Y,
|
||||
szLines[i],
|
||||
wcslen(szLines[i]));
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
static const WCHAR szTrayNotifyWndClass [] = TEXT("TrayNotifyWnd");
|
||||
|
||||
#define TRAY_NOTIFY_WND_SPACING_X 0
|
||||
#define TRAY_NOTIFY_WND_SPACING_X 1
|
||||
#define TRAY_NOTIFY_WND_SPACING_Y 1
|
||||
|
||||
class CTrayNotifyWnd :
|
||||
|
|
Loading…
Reference in a new issue