MozillaZine

Firebird Theme - a "light-weight" Theme

Discuss application theming and theme development.
ShareBird

User avatar
 
Posts: 2667
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil

Post Posted September 8th, 2009, 9:46 am

I was playing around with this approach and have written a small theme based on it.

It's a very small file (just 128KB) and is not based on the Default Theme.. IT IS the default theme indeed. It just chnages the toolbar buttons.

I've tested on Windows. But I have no idea how it works on Mac and Linux. I would very appreciate if someone could test it for me... :D

Here we go:

Firebird Theme

Cheers
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.

aaron

User avatar
 
Posts: 3130
Joined: November 4th, 2002, 8:49 pm
Location: Texas

Post Posted September 8th, 2009, 1:35 pm

Sharebird,

I tested this out on Firefox 3.5.2 (Windows XP) and it installed properly. It did not change the icons in the toolbar for me though. It changed the icons in the 'Customize' window, but when I dragged something from there to the toolbar, it showed up as the default icon on the toolbar.

ShareBird

User avatar
 
Posts: 2667
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil

Post Posted September 8th, 2009, 3:15 pm

Thank you very much, aaron, for testing!

I guess I did a little mistake...

I hope this file will work:

Firebird Theme

Cheers
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.

Jeff.Tet

User avatar
 
Posts: 478
Joined: August 25th, 2004, 7:36 pm

Post Posted September 9th, 2009, 6:45 am

Is this the method we spoke about?
Chromifox Extreme Themes Extreme | Carbon

Home Page Chromifox Themes

aaron

User avatar
 
Posts: 3130
Joined: November 4th, 2002, 8:49 pm
Location: Texas

Post Posted September 9th, 2009, 8:14 am

On the new file, I don't even see the altered icons in the 'Customize' window. So this is a step back from the previous file.

ShareBird

User avatar
 
Posts: 2667
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil

Post Posted September 9th, 2009, 8:30 am

Triton wrote:Is this the method we spoke about?

Hmmm... I remember we spoke about your helper?

I use the approach we talked about here, registering an empty (or even nonexistent) file for other themes except "Firebird", because I'm declaring a style overlay. When I declare a style overlay like I did:
Code: Select all
style      chrome://browser/content/browser.xul                 chrome://customskin/skin/browserOverlay.css


is the same as I would insert on browser.xul another line like:
Code: Select all
<?xml-stylesheet href="chrome://customskin/skin/browserOverlay.css" type="text/css"?>


This means Firefox will always look at chrome://customskin/skin/browserOverlay.css!!!

For Firefox be able to find my file, I need to register a new package "customskin":
Image
Code: Select all
skin   customskin   firebird      chrome/customskin/


To understand how Firefox will find it, it's necessary to understand how this works:
"If more than one skin is registered for a package, the chrome registry will select the best-fit skin using the user's preferences."

This works in this way:
Let's suppose an user has installed 4 themes, theme 1 , theme 2, theme 3, theme 4.

All these themes will register, e.g., a skin provider for the browser package:
Theme 1:
Code: Select all
skin      browser    theme_1      chrome/browser/


Theme 2:
Code: Select all
skin      browser    theme_2      chrome/browser/


Etc...

Now, Firefox has registered 5 skin providers for the browser package:

Image

The first best-fit skin is defined on user preferences at general.skins.selectedSkin preference. With this, Firefox will switch to the skin provider with this value as internal name.

So, I've registered a skin provider for the customskin package, right? But the only theme that has registered a skin for this package is already firebird.

When the user changes the value from general.skins.selectedSkin, Firefox will look for the respective register and, of course, will not find it. But it has already a skin provider registered for this package (the firebird skin) and will take it for all other themes.

That's the reason I need to register a folder with empty files also for the default theme:
Code: Select all
skin   customskin   classic/1.0      chrome/classic/customskin/

* Important - We need to register the skin for the default theme before we register our skin.

If it's not clear, please ask me, ok?

Cheers
Last edited by ShareBird on September 9th, 2009, 3:27 pm, edited 1 time in total.
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.

Jeff.Tet

User avatar
 
Posts: 478
Joined: August 25th, 2004, 7:36 pm

Post Posted September 9th, 2009, 9:39 am

It makes perfect sense! Thanks for clarifying :wink:
Chromifox Extreme Themes Extreme | Carbon

Home Page Chromifox Themes

ShareBird

User avatar
 
Posts: 2667
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil

Post Posted September 9th, 2009, 3:45 pm

Triton wrote:It makes perfect sense! Thanks for clarifying :wink:

Hi Triton, I've figured out something important. We need to register the skin for the default theme before we register our skin... (I've edited my post)

aaron wrote:On the new file, I don't even see the altered icons in the 'Customize' window. So this is a step back from the previous file.

Hmmm... Thanks, I guess I've figured out what was wrong. Could you please test it again? (Thank you very much ;-))

http://www.tudobom.de/xpi/firebird_1.0. ... nk_r34.jar
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.

Jeff.Tet

User avatar
 
Posts: 478
Joined: August 25th, 2004, 7:36 pm

Post Posted September 10th, 2009, 6:04 am

This version has worked perfect for me! =D> This method is going to ignite a whole new theme population!

Well Done!
Chromifox Extreme Themes Extreme | Carbon

Home Page Chromifox Themes

ShareBird

User avatar
 
Posts: 2667
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil

Post Posted September 10th, 2009, 6:54 am

I'm very glad it works! I've got feedback that is also working on Linux. I'm just waiting for some Mac users to know if it also works on Mac... I will later update the tutorial, so that people can use this theme as "basis" for similar themes.

Thank you very much for testing it!! :-)
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.

aaron

User avatar
 
Posts: 3130
Joined: November 4th, 2002, 8:49 pm
Location: Texas

Post Posted September 10th, 2009, 7:33 am

Seems to be working well.

Aronnax!
 
Posts: 1006
Joined: October 1st, 2004, 10:24 am
Location: Germany

Post Posted September 10th, 2009, 7:44 am

ShareBird wrote: I'm just waiting for some Mac users to know if it also works on Mac...


It works more or less.
The stop button is for example buggy. The copy, paste and cut buttons as well - they need something for the [disabled="true"] status.
The History and Bookmarks need something for [checked="true"]:active

Cheers

ShareBird

User avatar
 
Posts: 2667
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil

Post Posted September 10th, 2009, 7:50 am

Thank you Aronnax! I will compare the browser.css from pinstripe to figure out what happens.

Cheers
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.

Ngamer01

User avatar
 
Posts: 1009
Joined: November 3rd, 2007, 8:37 am
Location: Louisiana

Post Posted September 10th, 2009, 10:58 am

I tried out Firebird, but I didn't see any changes except for the icons in the Customize window. I guess I may have some add-on conflicting with Firebird here.

ShareBird

User avatar
 
Posts: 2667
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil

Post Posted September 10th, 2009, 11:28 am

I also did have something like this at one of mine profiles. It seems I have inconsistent results installing it. For me, disabling one extension (any one) restarting and enabling it again made it work.... Weird.
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.

Return to Theme Development


Who is online

Users browsing this forum: No registered users and 1 guest