Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The category-overlay.png image is merely a gradient overlay to give the category bar the right looks.</p> <p>Two options here. One more easy but not as reliable, the other a bit more difficult:</p> <h1>Option A: Easy</h1> <p>Create a userChrome.css in your $profile/chrome/ directory. It should contain the following:</p> <pre> .calendar-color-box[categories~="mycategory"], .calendar-event-box-container[categories~="mycategory"] { background-color: #abc123 !important; } </pre> <p>You'll need to do this for each category you'd like to change the color for. Note that changing the color of the category in the Lightning options won't change the category color you set here.</p> <h1>Option B: More complete</h1> <p>You'll need to modify some files inside lightning.xpi here. This solution merely requires you to set the category colors in Lightning and will also work for newly added categories. Note that this way events without a category are transparent, if you want more you'll have to do it on your own.</p> <ol> <li>Open lightning.xpi with a zip program</li> <li>Enter the directory chrome/</li> <li>Open the containing calendar.jar with a zip program</li> <li>Descend into content/calendar/</li> <li>Open calendar-multiday-view.xml <ul> <li>search "calendar-color-box" and remove it from the class attribute</li> <li>a few lines above there is a &lt;content&gt; tag, add class="category-color-box" to it</li> </ul></li> <li>Open calendar-month-view.xml and calendar-view-core.xml and do the same</li> <li>Save the files back to calendar.jar</li> <li>Save calendar.jar back to lightning.xpi</li> <li>Install the modified lightning.xpi</li> </ol> <p>If you'd rather see a patch, this applies to the latest comm-central source:</p> <pre><code>diff --git a/calendar/base/content/calendar-month-view.xml b/calendar/base/content/calendar-month-view.xml --- a/calendar/base/content/calendar-month-view.xml +++ b/calendar/base/content/calendar-month-view.xml @@ -52,21 +52,20 @@ &lt;bindings id="calendar-month-view-bindings" xmlns="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xbl="http://www.mozilla.org/xbl"&gt; &lt;binding id="calendar-month-day-box-item" extends="chrome://calendar/content/calendar-view-core.xml#calendar-editable-item"&gt; - &lt;content mousethrough="never" tooltip="itemTooltip"&gt; + &lt;content mousethrough="never" tooltip="itemTooltip" class="category-color-box"&gt; &lt;xul:vbox flex="1"&gt; &lt;xul:hbox&gt; &lt;xul:box anonid="event-container" - class="calendar-color-box" xbl:inherits="calendar-uri,calendar-id" flex="1"&gt; &lt;xul:box class="calendar-event-selection" orient="horizontal" flex="1"&gt; &lt;xul:stack anonid="eventbox" class="calendar-event-box-container" xbl:inherits="readonly,flashing,alarm,allday,priority,progress,status,calendar,categories" flex="1"&gt; &lt;xul:hbox class="calendar-event-details"&gt; diff --git a/calendar/base/content/calendar-multiday-view.xml b/calendar/base/content/calendar-multiday-view.xml --- a/calendar/base/content/calendar-multiday-view.xml +++ b/calendar/base/content/calendar-multiday-view.xml @@ -2119,20 +2119,19 @@ ]]&gt;&lt;/handler&gt; &lt;/handlers&gt; &lt;/binding&gt; &lt;!-- - An individual event box, to be inserted into a column. --&gt; &lt;binding id="calendar-event-box" extends="chrome://calendar/content/calendar-view-core.xml#calendar-editable-item"&gt; - &lt;content mousethrough="never" tooltip="itemTooltip"&gt; + &lt;content mousethrough="never" tooltip="itemTooltip" class="category-color-box"&gt; &lt;xul:box xbl:inherits="orient,width,height" flex="1"&gt; &lt;xul:box anonid="event-container" - class="calendar-color-box" xbl:inherits="orient,readonly,flashing,alarm,allday,priority,progress,status,calendar,categories,calendar-uri,calendar-id" flex="1"&gt; &lt;xul:box class="calendar-event-selection" orient="horizontal" flex="1"&gt; &lt;xul:stack anonid="eventbox" align="stretch" class="calendar-event-box-container" flex="1" xbl:inherits="context,parentorient=orient,readonly,flashing,alarm,allday,priority,progress,status,calendar,categories"&gt; diff --git a/calendar/base/content/calendar-view-core.xml b/calendar/base/content/calendar-view-core.xml --- a/calendar/base/content/calendar-view-core.xml +++ b/calendar/base/content/calendar-view-core.xml @@ -46,21 +46,21 @@ xmlns="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xbl="http://www.mozilla.org/xbl"&gt; &lt;binding id="calendar-editable-item"&gt; &lt;content mousethrough="never" tooltip="itemTooltip" - tabindex="-1"&gt; + tabindex="-1" + class="category-color-box"&gt; &lt;xul:vbox flex="1"&gt; &lt;xul:hbox&gt; &lt;xul:box anonid="event-container" - class="calendar-color-box" xbl:inherits="calendar-uri,calendar-id" flex="1"&gt; &lt;xul:box class="calendar-event-selection" orient="horizontal" flex="1"&gt; &lt;xul:stack anonid="eventbox" class="calendar-event-box-container" flex="1" xbl:inherits="readonly,flashing,alarm,allday,priority,progress,status,calendar,categories"&gt; &lt;xul:hbox class="calendar-event-details"&gt; </code></pre> <h1>Option C: Change Javascript</h1> <p>This would be the best working hack, although it requires javascript changes. Open calendar.jar as described in Option B and check out calendar-views.js, there are two functions: <code>updateStyleSheetForViews()</code> and <code>updateStyleSheetForCategory()</code>. I'll leave this to people that want to tinker with it themselves, but the idea would be to add a rule for <code>.calendar-color-box[categories~=...]</code> that overrides the default rule in case there are categories. This way if there is no category set, the calendar color is used, otherwise the desired category color.</p> <p>Have fun :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload