[ros-bugs] [Bug 1574] New: Clock cut-off
ReactOS.Bugzilla at reactos.org
ReactOS.Bugzilla at reactos.org
Sun Jun 11 20:56:41 CEST 2006
http://www.reactos.org/bugzilla/show_bug.cgi?id=1574
Summary: Clock cut-off
Product: ReactOS
Version: TRUNK
Platform: x86 Hardware
OS/Version: ReactOS
Status: NEW
Severity: minor
Priority: P3
Component: Shell
AssignedTo: ros-bugs at reactos.org
ReportedBy: dsibley at hotmail.com
QAContact: ros-bugs at reactos.org
The clock in the system tray is cut-off at the right hand side when it is drawn
with a narrow time (i.e. "1:11" and then redrawn at "10:00 PM" -- I'm not sure
why but I seem to see AM but not PM...).
The following patch to fix it is a bit of a hack (ideally the clock panel would
be redrawn at a new width whenever the time changes or the system font is
changed):
for file Trunk\reactos\base\shell\explorer\taskbar\traynotify.cpp:
Index: traynotify.cpp
===================================================================
--- traynotify.cpp (revision 22302)
+++ traynotify.cpp (working copy)
@@ -1284,12 +1284,15 @@
RECT rect = {0, 0, 0, 0};
TCHAR buffer[8];
+ _tcscpy(buffer, TEXT("00:00 PM")); // As wide as the text can get for
width calculation
+ DrawText(canvas, buffer, -1, &rect,
DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT);
+ int clockwindowWidth = rect.right-rect.left + 4;
+
if (!GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, NULL, NULL,
buffer, sizeof(buffer)/sizeof(TCHAR)))
_tcscpy(buffer, TEXT("00:00"));
- DrawText(canvas, buffer, -1, &rect,
DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT);
- int clockwindowWidth = rect.right-rect.left + 4;
+
return Window::Create(WINDOW_CREATOR(ClockWindow), 0,
wcClock, NULL,
WS_CHILD|WS_VISIBLE,
clnt.right-(clockwindowWidth), 1, clockwindowWidth, clnt.bottom-2, hwndParent);
--
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
You are the assignee for the bug, or are watching the assignee.
More information about the Ros-bugs
mailing list