MozillaZine


Possible .CSS changes instead of Calendar Tweaks?

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
Ed1
 
Posts: 985
Joined: January 30th, 2005, 2:33 pm

Post Posted November 22nd, 2020, 2:16 pm

I have held off upgrading TB68 to TB78, in part because of the loss of the Calendar Tweaks addon in TB78. I am wondering if it would be possible to duplicate a few of the Calendar Tweaks functions with .css code changes incorporated into the userchrome.css file. Specifically,

1. Reducing the vertical height by 1px on the top and bottom of all events, tasks, reminders shown in the calendar Month display. Calendar Tweaks has a checkbox option that does this.

2. Removing (or making transparent) the dark 1px border around some events, tasks, reminders shown in the calendar Month display. Not sure if removing this border would also reduce the vertical height - see #1 above. (Some calendar entries seem to have the dark border, others don't. Can't figure out which types do and don't - at first thought it was only recurring items, but this does not seem correct.)

3. Changing the default yellow color of the selected day box background and its box label to user-selected colors.


Would there be available .css code to accomplish any/all of these things?

Code Name

User avatar
 
Posts: 161
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Post Posted November 22nd, 2020, 6:27 pm

I just wish another developer would adopt the Calendar Tweaks add-on and update it for use on v78+.

I really miss the calendar events bar colors being reversed - with the event bars colored primarily with the category color instead of the calendar color. I also miss the icon that represents a repeating event and the slash (/) through the icon if the repeating event has been changed since it was created.
Politicians and Diapers must be changed often for the exact same reason...

morat
 
Posts: 4291
Joined: February 3rd, 2009, 6:29 pm

Post Posted November 22nd, 2020, 11:35 pm

@Ed1

3.

Try changing the :root variables in the userChrome.css file.

Code: Select all
:root {
  --viewDayBoxSelectedBackground: pink !important;
  --viewMonthDayBoxSelectedBackground: orange !important;
}

Reference
http://searchfox.org/comm-esr78/source/calendar/base/themes/common/calendar-views.css

Ed1
 
Posts: 985
Joined: January 30th, 2005, 2:33 pm

Post Posted November 23rd, 2020, 7:20 am

@Code Name, agreed!

@morat, thank you (again!) for pointing me to solutions for these items. You are so knowledgeable when it comes to these types of UI tweaks!

WaltS48

User avatar
 
Posts: 4681
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Post Posted November 23rd, 2020, 7:52 am

Ed1 wrote:@Code Name, agreed!

@morat, thank you (again!) for pointing me to solutions for these items. You are so knowledgeable when it comes to these types of UI tweaks!


He/She should start creating extensions. :-"
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5

morat
 
Posts: 4291
Joined: February 3rd, 2009, 6:29 pm

Post Posted November 23rd, 2020, 11:08 am

@Ed1

Try these:

1.

Code: Select all
calendar-month-day-box-item .calendar-event-box-container {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}

2.

Code: Select all
.calendar-color-box {
  border: none !important;
}

You can find the options dialog descriptions in the .dtd file and the corresponding styles in the .css file within the .xpi file.

* chrome\locale\en-US\calendartweaks.dtd
* chrome\skin\calendartweaks-calendar-views.css

I guess (1) is the "Reduce height of events" description in the .dtd file and the "eventreduceheight" style in the .css file.

Is (2) even a Calendar Tweaks style?

Some tweaks require JavaScript so there isn't a pure userChrome.css solution.

Calendar Tweaks
http://addons.thunderbird.net/thunderbird/addon/14384

Calendar Tweaks Options - General
http://addons.thunderbird.net/user-media/previews/full/128/128930.png

Calendar Tweaks Options - Day Colors
http://addons.thunderbird.net/user-media/previews/full/128/128932.png

Ed1
 
Posts: 985
Joined: January 30th, 2005, 2:33 pm

Post Posted November 23rd, 2020, 1:07 pm

@morat. Your code suggestions for all 3 items are working! I was trying without success to figure out how to get #2 and #3 working. I did unzip the Calendar Tweaks addon, but still couldn't find my way to the solutions.

You are right, #2 (remove borders) is apparently not a Calendar Tweaks style. I thought it was.

My further looking at the event borders issue showed that the events with borders were coming from external subscribed calendars (U.S. holidays, etc.), with the exception of one of my own event entries on an iCloud calendar that had a border. I deleted the event and re-created it - no border.

Thanks very much for following up with the solutions to all of these items. I really appreciate it. Now, I will have to seriously consider moving to TB78. Just need to get over Duplicate Contacts Manager not working in TB78 - I really like that addon.

Following up on @WaltS48's comment, you seem like the perfect person to update Calendar Tweaks for TB78! Thousands of users would be pleased! Any interest?

Code Name

User avatar
 
Posts: 161
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Post Posted December 22nd, 2020, 12:03 pm

There are two things I really liked about the 'Calendar Tweaks' add-on:
• Coloring event backgrounds with the category colors.
• Adding icons for repeating events and exceptions.


I know virtually nothing about using CSS in userChrome, but from everything I've read about 'Coloring event backgrounds with the category colors' using css requires that each individual category must be listed in the css file and maintained. So, if I wanted to add a new category or change the color of an existing category, I must go into the css file and make those changes. I use 50 categories and 7 calendars in my Tb calendar. I don't feel comfortable (or confident) in my ability to come up with the correct coding and editing, and the necessity to maintain it. It's just more than I care to get involved with.

Then, there's the second add-on I really liked about 'Calendar Tweaks' that adds icons for repeating events and exceptions.

It has been suggested that I look into seeing if maybe another developer of a calendar-related add-on might be interested in either adopting the abandoned 'Calendar Tweaks' add-on, or incorporating some of the features of 'Calendar Tweaks' into his/her calendar-related add-on. However, I haven't found a developer that has an extensive add-on for the Tb calendar.

I'm still hoping that some experienced developer will adopt the abandoned 'Calendar Tweaks' add-on and make it compatible for Tb78+. I'd gladly make a hefty 3-digit donation.
Politicians and Diapers must be changed often for the exact same reason...

morat
 
Posts: 4291
Joined: February 3rd, 2009, 6:29 pm

Post Posted December 22nd, 2020, 3:37 pm

Code Name wrote:Coloring event backgrounds with the category colors.

Are you asking for the same tweak as riverstyx?

My solution: viewtopic.php?p=14879236#p14879236

I'm using the error console to create riverstyx's userChrome.css code because I don't know his custom categories and colors.

Code Name wrote:Adding icons for repeating events and exceptions.

That tweak requires JavaScript. There isn't a pure userChrome.css solution.

Code Name

User avatar
 
Posts: 161
Joined: December 23rd, 2019, 1:53 pm
Location: Dallas, TX

Post Posted December 22nd, 2020, 6:31 pm

morat wrote:
Code Name wrote:Coloring event backgrounds with the category colors.

Are you asking for the same tweak as riverstyx?

My solution: viewtopic.php?p=14879236#p14879236

I'm using the error console to create riverstyx's userChrome.css code because I don't know his custom categories and colors.

Code Name wrote:Adding icons for repeating events and exceptions.

That tweak requires JavaScript. There isn't a pure userChrome.css solution.


morat - Yeah, I think so - I want to color the calendar event backgrounds with the category colors instead of the calendar colors, but without having to list each of my 50 categories in the CSS coding and maintaining it.

I'd like a simple plug-'n-play method I guess. I'd love to have a zip file I open and bingo it's been added. And, all I need to do is change Thunderbird's config editor for preference toolkit.legacyUserProfileCustomizations.stylesheets=true (or something like that I think!) and I'm done. I wish! [-o<

I have no idea what your reference to the 'error console' is about. I guess you needing to use it means that I would need to use it too. That's far beyond my grasp of things.

I see that riverstyx never responded to you solution. I'd like to hear from him to know if your solution worked for him - and that all his calendar event backgrounds were successfully and automatically colored with his category colors. Or, maybe his Tb calendar crashed and burned! I dunno.

As you can tell I have no clue about using userChrome.css code. To be very honest, all that coding looks Greek to me. I don't understand it, therefore I'm very hesitant to even try to use it...afraid I'll mess something up.
Politicians and Diapers must be changed often for the exact same reason...

morat
 
Posts: 4291
Joined: February 3rd, 2009, 6:29 pm

Post Posted December 22nd, 2020, 9:24 pm

@Code Name

As of Firefox 69, Firefox ESR 68, Thunderbird 68, you must set the toolkit.legacyUserProfileCustomizations.stylesheets preference to true in about:config in order to load the userChrome.css file.

How to create a userChrome.css file (for Firefox)
http://www.userchrome.org/how-create-userchrome-css.html

...

In Thunderbird, the Browser Console is called the Error Console.

i.e. Tools > Developer Tools > Error Console (ctrl+shift+j)

Browser Console
http://developer.mozilla.org/docs/Tools/Browser_Console

DanRaisch
Moderator

User avatar
 
Posts: 124286
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted December 23rd, 2020, 11:12 am

Locking as the solution has already been posted in another thread -- viewtopic.php?p=14880937#p14880937

Return to Calendar


Who is online

Users browsing this forum: No registered users and 0 guests