mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +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);
|
hPrevFont = (HFONT) SelectObject(hDC, hFont);
|
||||||
|
|
||||||
rcClient.left = (rcClient.right / 2) - (CurrentSize.cx / 2);
|
|
||||||
rcClient.top = (rcClient.bottom / 2) - (CurrentSize.cy / 2);
|
rcClient.top = (rcClient.bottom / 2) - (CurrentSize.cy / 2);
|
||||||
rcClient.right = rcClient.left + CurrentSize.cx;
|
|
||||||
rcClient.bottom = rcClient.top + CurrentSize.cy;
|
rcClient.bottom = rcClient.top + CurrentSize.cy;
|
||||||
|
|
||||||
for (i = 0, line = 0;
|
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)
|
if (LineSizes[i].cx != 0)
|
||||||
{
|
{
|
||||||
TextOut(hDC,
|
TextOut(hDC,
|
||||||
rcClient.left + (CurrentSize.cx / 2) - (LineSizes[i].cx / 2) +
|
(rcClient.right - LineSizes[i].cx) / 2,
|
||||||
TRAY_CLOCK_WND_SPACING_X,
|
|
||||||
rcClient.top + TRAY_CLOCK_WND_SPACING_Y,
|
rcClient.top + TRAY_CLOCK_WND_SPACING_Y,
|
||||||
szLines[i],
|
szLines[i],
|
||||||
wcslen(szLines[i]));
|
wcslen(szLines[i]));
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
static const WCHAR szTrayNotifyWndClass [] = TEXT("TrayNotifyWnd");
|
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
|
#define TRAY_NOTIFY_WND_SPACING_Y 1
|
||||||
|
|
||||||
class CTrayNotifyWnd :
|
class CTrayNotifyWnd :
|
||||||
|
|
Loading…
Reference in a new issue