color of categories: visible as background, not border

RESOLVED WONTFIX

Status

--
enhancement
RESOLVED WONTFIX
13 years ago
7 years ago

People

(Reporter: damian.publicemail, Unassigned)

Tracking

Trunk
x86
Windows XP

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2

I found out request bug 171657

Now color is visible as border of item, can it be visible as background?
If you fill background, than it will be much more userfriendly (now all items are blue), hovewer some item is not visible properly because of border, text is behind border
When background has color of category, border is useless :)

Reproducible: Always




version: nightly/2006-04-10-08-trunk/sunbird-0.3a1+.en-US.win32.zip
(Reporter)

Updated

13 years ago
Version: unspecified → Trunk
The calendar color is used as the event background color. You can specify a different color for each of your calendars.
(Reporter)

Comment 2

13 years ago
Created attachment 218703 [details]
screenshot: current view and my suggest

Well, I do not think about calendar but about each item.
Take a look and see how it is and how it could be.
This is probably cosmetic change like from setBorderColor to setBackgroundColor, but I do not know code.

Comment 3

13 years ago
(In reply to comment #0)
> Now color is visible as border of item, can it be visible as background?
No, ssitter is right.  Most people manage multiple calendars, and the background color is what they expect (if only because other apps follow the exact same behavior).  This is WONTFIX.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WONTFIX
The bugspam monkeys have struck again. They are currently chewing on default assignees for Calendar. Be afraid for your sanity!
Assignee: base → nobody

Comment 5

7 years ago
I disagree with Joey.  'Most People' in his mind must be non-business users.  We use over 15 categories, and in Outlook this shows different colors very nicely.  There is no way I'm creating 15 calendars just so I can have 15 colors.

It seems that if you swap calColor and catColor in calWeekPrinter.js and calMothGridPrinter.js ie:



let style = 'font-size: 11px; background-color: ' + catColor + ';';
            style += ' color: ' + cal.getContrastingTextColor(catColor);
            if (calColor) {
                style += ' border: solid ' + calColor + ' 2px;';


that this would swap the Calendar color to the side strip and the category color to the background of the task.

I've tried it several ways, but nothing seems to change in my Lightning.  I've even rebuilt a fresh download and made these changes in calendar-en-US.jar but still no changes.  What am I missing to push this change to my thunderbird/lightning?

Comment 6

7 years ago
I amend my statement:
The change to replace the calendar coloring in th eevent for the category color seems to lie in the function updateStyleSheetForCategory in calendar-view.js

  updateStyleSheetForCategory: function cM_updateStyleSheetForCategory(aCatName) {
        if (!(aCatName in this.categoryStyleCache)) {
            // We haven't created a rule for this category yet, do so now.
            let sheet = getViewStyleSheet();
            let ruleString = '.category-color-box[categories~="' + aCatName + '"] {} ';
            let ruleIndex = sheet.insertRule(ruleString, sheet.cssRules.length);

            this.categoryStyleCache[aCatName] = sheet.cssRules[ruleIndex];
        }

        let color = cal.getPrefSafe("calendar.category.color." + aCatName) || "";
        this.categoryStyleCache[aCatName].style.backgroundColor = color;

}
";


but adding this.ruleCache[aCalendar.id].style.backgroundColor = color; 
after the last statement doesn't seem to work (copied from UpdateStyleSheetForViews) as if the this reference isn't carrying the ruleCache object any longer.  What would be the simplest way of pulling in the object into this function? getSelectedCalendar().id?

Comment 7

7 years ago
You probably saw this coming.  getSelectedCalendar().id worked, but since the calendar-box object is shared by all events in the calendar, all events are now the same color as the first category seen.  It seems my choices are either to find a way of moving the calendar-box down to be at the same level as the category box or find a way of widdening the category-box to full width, and adding a text field to it, then assigning the text to it.
You need to log in before you can comment on or make changes to this bug.