Closed Bug 366145 Opened 18 years ago Closed 18 years ago

Monthly and Weekly layout: Event text not readable with dark calendar background colors if option 'Print Background' is enabled

Categories

(Calendar :: Printing, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ssitter, Assigned: jminta)

Details

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a2pre) Gecko/20070106 Calendar/0.4a1

If a calendar is configured to use a dark background color the calendar view displays the events using white text for better legibility. But the print output always displays events with black text. This renders the text unreadable when using dark background color.

Steps to Reproduce:
1. Go to Calendars tab and select a dark color for this calendar
2. Create some dummy events for this calendar
3. Go to menu 'File -> Page Setup...' and enable option 'Print Background'
4. Go to menu 'File -> Print...' and open Print Preview
5. Select layout 'Monthly Grid' or 'Weekly Planner' and print
6. Check print preview and/or print output

Actual Results:
Event text is not readable because print output shows the events with black text on dark background color.
Attached patch port getContrastingColor — — Splinter Review
It's not great that we have to keep duplicating this code to calUtils.js, but at least we're not duplicating it across all our components.  This patch ports the code we use for the views to determine the font color to the printing code.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #250753 - Flags: second-review?(mvl)
Attachment #250753 - Flags: first-review?(lilmatt)
Comment on attachment 250753 [details] [diff] [review]
port getContrastingColor

>Index: calendar/import-export/calMonthGridPrinter.js
>+dump("getting color:"+getContrastingTextColor(catColor));
Get rid of the dump.

r2=mvl with that.
Do file a followup-bug about not needing the copy of getContrastingTextColor().
Comment on attachment 250753 [details] [diff] [review]
port getContrastingColor

Setting mvl's flag per comment #2.

r=lilmatt without the dump and with the followup.
Attachment #250753 - Flags: second-review?(mvl)
Attachment #250753 - Flags: second-review+
Attachment #250753 - Flags: first-review?(lilmatt)
Attachment #250753 - Flags: first-review+
Patch checked in, Bug 366560 has been added to the database.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
While the issue reported in this bug now works fine using Sunbird/0.4a1 (2007011008) it revealed a new issue:

If the option 'Print Background' is disabled (by default) the print output omits the background color but keeps the foreground color. As the result you see nothing because of white text on white background :-(
(In reply to comment #5)
Please file a new bug for that.  I'm not knowledgeable enough about the Mozilla print API to be able to fix that on the fly.
Filed Bug 366590
Summary: Monthly and Weekly layout: Event text not readable with dark calendar background colors → Monthly and Weekly layout: Event text not readable with dark calendar background colors if option 'Print Background' is enabled
verifid with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070112 Calendar/0.4a1
Status: RESOLVED → VERIFIED
Whiteboard: [litmus testcase wanted]
Flags: in-litmus?
Whiteboard: [litmus testcase wanted]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: