MozillaZine

Toolbar Enhancements 0.15

Talk about add-ons and extension development.
bdeonline
Moderator

User avatar
 
Posts: 1214
Joined: November 5th, 2002, 5:19 am
Location: OK, USA

Post Posted September 30th, 2003, 1:44 pm

I to like the new stop/reload button but is there away to simpily get the reload and stop buttons from the theme your using. I use the Pinball theme mostly and would like to at least keep the main buttons the same then put the extra buttons on a seperate toolbar.

If not is there something I can put in my userchrome.css to customize it myself.

TychoQuad
 
Posts: 1263
Joined: December 11th, 2002, 12:30 am
Location: Australia

Post Posted October 1st, 2003, 2:05 am

clav wrote:
TychoQuad wrote:on that note, clav, please make the statubar a toolbar!

i've already said that i'll try and do that, and you replied to that post. there is no point asking for it again.


You said that you'd like to do that, and wasn't sure if it was feasable. You never said anything on the subject after that point, even after I expressed interest in it, This feature is #2 on my all time Firebird request list, so excuse me for making sure you heard me!

It seems you have something against me, so PLEASE tell me whenever I say something you dislike or disagree with. I don't want any bad blood in these forums, I just want to discuss our common interest in a friendly and civil way.

velcrospud
 
Posts: 506
Joined: January 27th, 2003, 4:00 am

Post Posted October 1st, 2003, 2:51 am

statubar a toolbar

As far as making the statusbar elements into moveable toolbar elements, I think what I suggested here would work but I haven't tried it.

c∂n

User avatar
 
Posts: 700
Joined: June 28th, 2003, 8:31 am
Location: Longitude 0ish

Post Posted October 1st, 2003, 6:19 am

bdeonline wrote:I to like the new stop/reload button but is there away to simpily get the reload and stop buttons from the theme your using. I use the Pinball theme mostly and would like to at least keep the main buttons the same then put the extra buttons on a seperate toolbar.

If not is there something I can put in my userchrome.css to customize it myself.


clav's original css

Code: Select all
#toolbarext-stopreload[state="stop"] {
  list-style-image: url(chrome://toolbarext/skin/large.png);
  -moz-image-region: rect(0 448px 32px 416px);
}
toolbar[iconsize="small"] #toolbarext-stopreload[state="stop"] {
  list-style-image: url(chrome://toolbarext/skin/small.png);
  -moz-image-region: rect(0 280px 20px 260px);
}

#toolbarext-stopreload {
  list-style-image: url(chrome://toolbarext/skin/large.png);
  -moz-image-region: rect(0 480px 32px 448px);
}
toolbar[iconsize="small"] #toolbarext-stopreload {
  list-style-image: url(chrome://toolbarext/skin/small.png);
  -moz-image-region: rect(0 300px 20px 280px);
}



changes to

Code: Select all
#toolbarext-stopreload[state="stop"],
toolbar[iconsize="small"] #toolbarext-stopreload[state="stop"] {
  list-style-image: url("chrome://browser/skin/pb-btn1.png") !important;
  -moz-image-region: rect(0px 216px 22px 180px) !important;
}

#toolbarext-stopreload,
toolbar[iconsize="small"] #toolbarext-stopreload {
  list-style-image: url("chrome://browser/skin/pb-btn1.png") !important;
  -moz-image-region: rect(0px 108px 22px 72px) !important;
}

#toolbarext-stopreload[state="stop"]:hover,
toolbar[iconsize="small"] #toolbarext-stopreload[state="stop"]:hover {
  -moz-image-region: rect(24px 216px 46px 180px) !important;
}

#toolbarext-stopreload:hover,
toolbar[iconsize="small"] #toolbarext-stopreload:hover {
  -moz-image-region: rect(24px 108px 46px 72px) !important;
}

#toolbarext-stopreload[state="stop"]:hover:active,
toolbar[iconsize="small"] #toolbarext-stopreload[state="stop"]:hover:active {
  -moz-image-region: rect(48px 216px 70px 180px) !important;
}

#toolbarext-stopreload:hover:active,
toolbar[iconsize="small"] #toolbarext-stopreload:hover:active {
  -moz-image-region: rect(48px 108px 70px 72px) !important;
}

/*
#toolbarext-stopreload[disabled="true"][state="stop"],
toolbar[iconsize="small"] #toolbarext-stopreload[state="stop"] {
  -moz-image-region: rect(72px 216px 94px 180px) !important;
}

#toolbarext-stopreload[disabled="true"],
toolbar[iconsize="small"] #toolbarext-stopreload {
  -moz-image-region: rect(72px 108px 94px 72px) !important;
}
*/



2nd set of code to be added to userChrome.css
Last edited by c∂n on October 1st, 2003, 6:30 am, edited 1 time in total.

Paradox52525

User avatar
 
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere

Post Posted October 1st, 2003, 6:24 am

Whoa...does that actually work? That will cause it to take the current theme's graphics? I was under the impression that it was all but impossible to get overlays to use a theme's graphics...

c∂n

User avatar
 
Posts: 700
Joined: June 28th, 2003, 8:31 am
Location: Longitude 0ish

Post Posted October 1st, 2003, 6:28 am

Paradox52525 wrote:Whoa...does that actually work? That will cause it to take the current theme's graphics? I was under the impression that it was all but impossible to get overlays to use a theme's graphics...


it is, this requires user intervention

Torisugari
 
Posts: 1634
Joined: November 4th, 2002, 8:34 pm
Location: Kyoto, Nippon (GMT +9)

Post Posted October 1st, 2003, 6:49 am

I wonder why every theme author uses -moz-image-region instead of separated images. Does it save chrome loarding time or memory usage?

clav
 
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK

Post Posted October 1st, 2003, 9:17 am

Torisugari wrote:I wonder why every theme author uses -moz-image-region instead of separated images. Does it save chrome loarding time or memory usage?


because single image files are smaller, and easier to work with?

it generally works out at the same amount of css. (you have lots of -moz-image-region declarations instead of the same number of list-style-image ones).

Paradox52525

User avatar
 
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere

Post Posted October 1st, 2003, 10:11 am

c∂n wrote:it is, this requires user intervention


So then couldn't you theoretically make an extension that skins its overlays by having the install scripts add the necessarly lines to userchrome.css? Or is that not possible?

c∂n

User avatar
 
Posts: 700
Joined: June 28th, 2003, 8:31 am
Location: Longitude 0ish

Post Posted October 1st, 2003, 11:25 am

Paradox52525 wrote:
c∂n wrote:it is, this requires user intervention


So then couldn't you theoretically make an extension that skins its overlays by having the install scripts add the necessarly lines to userchrome.css? Or is that not possible?


then you'd need to know the appropriate code for every theme that a user might possibly install

could get messy very quickly

c∂n

User avatar
 
Posts: 700
Joined: June 28th, 2003, 8:31 am
Location: Longitude 0ish

Post Posted October 1st, 2003, 11:39 am

clav wrote:
Torisugari wrote:I wonder why every theme author uses -moz-image-region instead of separated images. Does it save chrome loarding time or memory usage?


because single image files are smaller, and easier to work with?

...


smaller, often; easier, depends on your mental arithmetic : )

Paradox52525

User avatar
 
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere

Post Posted October 1st, 2003, 1:06 pm

c∂n wrote:then you'd need to know the appropriate code for every theme that a user might possibly install could get messy very quickly


OOOOHhh, that code was specific to the theme he's using? I see, I thought it was global. So what if someone developed a kind of open theme standard that would have every theme use the same bitmap names/locations/ect, couldn't you then write code that would allow you to skin buttons using any theme that followed that standard? Or am I completely off base?

::Is just kinda brainstorming, trying to figure out a way that overlays could reliably change their graphics based on the current theme::

c∂n

User avatar
 
Posts: 700
Joined: June 28th, 2003, 8:31 am
Location: Longitude 0ish

Post Posted October 1st, 2003, 3:14 pm

Paradox52525 wrote:
c∂n wrote:then you'd need to know the appropriate code for every theme that a user might possibly install could get messy very quickly


OOOOHhh, that code was specific to the theme he's using? I see, I thought it was global. So what if someone developed a kind of open theme standard that would have every theme use the same bitmap names/locations/ect, couldn't you then write code that would allow you to skin buttons using any theme that followed that standard? Or am I completely off base?

::Is just kinda brainstorming, trying to figure out a way that overlays could reliably change their graphics based on the current theme::


you'd have to have images the same size, with image regions the same size as well, the alternative as clav mentioned earlier, would be for the buttons to be defined with classes [rather than or] as well as ids

i.e.

.stop-button declarations concurrent with #stop-button declarations

yes, that code is specific to pinball

Paradox52525

User avatar
 
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere

Post Posted October 1st, 2003, 4:06 pm

c∂n wrote:...the alternative as clav mentioned earlier, would be for the buttons to be defined with classes [rather than or] as well as ids

i.e.

.stop-button declarations concurrent with #stop-button declarations

yes, that code is specific to pinball


And I'm assuming that's something that would have to be done in the core? Is there a bug for this or anything of the like? It seems very silly that with all the power XUL gives extension authors, there's NO good way to grab images from the current theme. You would think they could just make each image have an environment variable that themers and extension authors could point to, I mean it seems like there should be SOME way to do this...

bdeonline
Moderator

User avatar
 
Posts: 1214
Joined: November 5th, 2002, 5:19 am
Location: OK, USA

Post Posted October 1st, 2003, 6:22 pm

It took me awhile to get back to this thread but I'm back.
Thanks cdn that makes Pinball look great one button for stop/refresh.

There needs to be some set of basic rules to theming created such as the names of buttons ect. To allow extentions to work better with the themed gui.

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 4 guests