https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d11e7af5f2539c417e980…
commit d11e7af5f2539c417e980ba1b3a622f8da450603
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Mon Jan 29 21:50:33 2018 +0200
Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Mon Jan 29 21:50:33 2018 +0200
[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.
---
base/shell/explorer/trayclock.cpp | 5 +----
base/shell/explorer/trayntfy.cpp | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/base/shell/explorer/trayclock.cpp b/base/shell/explorer/trayclock.cpp
index b16a2151a1..5236a9809c 100644
--- a/base/shell/explorer/trayclock.cpp
+++ b/base/shell/explorer/trayclock.cpp
@@ -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]));
diff --git a/base/shell/explorer/trayntfy.cpp b/base/shell/explorer/trayntfy.cpp
index a59423ac76..4326ca727e 100644
--- a/base/shell/explorer/trayntfy.cpp
+++ b/base/shell/explorer/trayntfy.cpp
@@ -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 :