MozillaZine

Digger and Stylesheet Switcher updated

Talk about add-ons and extension development.
clav
 
Posts: 1974
Joined: November 5th, 2002, 3:25 am
Location: Lancaster, UK

Post Posted February 10th, 2003, 7:33 pm

I have updated Digger with a new icon to match the (not so) new default theme in Phoenix. There is also now a section at the bottom of the popup where subdomains are repeatedly trimmed off the URL. (Someone requested this back in December, and cdn emailed me some code to implement it earlier today).

Stylesheet Switcher unfortunately does not have new button images, as i couldn't think of anything good that would fit in with the default Phoenix theme, so it still has the old Orbit style icon. It does now have a "No Page Stylesheet" as well as "Basic Page Style" even for pages using persistent stylesheets (as defined in the HTML spec), which is a feature a number of people have asked for.

It should also be possible for themes to theme both extensions now as i have fixed their stylesheets.

Both are available from http://clav.co.uk/

Since both extensions involve customising the toolbars you wont want to use them with the recent nightlies (after 31st January i think) as toolbar customisation is badly broken.

priior

User avatar
 
Posts: 374
Joined: November 10th, 2002, 3:45 pm
Location: montreal

Post Posted February 10th, 2003, 7:40 pm

i still think it would be much more practical (easier for you) and pretty to use nontheme specific icons ( like the original mozilla diggler x> )

just a suggestion :)

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

Post Posted February 10th, 2003, 7:58 pm

IMHO theres no such thing as a non-theme-specific icon. The Diggler x> would have looked out of place against Orbit for instance (or at least I think it would). My view is that you just end up with something that looks slightly out of place on all themes, rather than being right on one.

Feel free to prove me wrong by coming up with some really great nonspecific icons though :)

Anyway, it <i>is</i> now possible to theme Digger and StyleSwitcher, whereas it wasn't (or was at least extremely difficult) previously. Hopefully some theme authors will do so.

Chris Cook

User avatar
 
Posts: 898
Joined: December 14th, 2002, 9:57 am
Location: Québec, Canada

Post Posted February 10th, 2003, 8:39 pm

clav wrote:IMHO theres no such thing as a non-theme-specific icon. The Diggler x> would have looked out of place against Orbit for instance (or at least I think it would). My view is that you just end up with something that looks slightly out of place on all themes, rather than being right on one.

Feel free to prove me wrong by coming up with some really great nonspecific icons though :)

Anyway, it <i>is</i> now possible to theme Digger and StyleSwitcher, whereas it wasn't (or was at least extremely difficult) previously. Hopefully some theme authors will do so.

Perhaps for extensions that require a toolbar button, creators could create a sort of generic graphic or image that could be overlaid on a more theme specific button? This might encourage theme developers to do the extra work. I personally don't use many extensions but I wouldn't mind updating my themes with some extension buttons, _if_ there isn't too much work involved.

priior

User avatar
 
Posts: 374
Joined: November 10th, 2002, 3:45 pm
Location: montreal

Post Posted February 10th, 2003, 10:23 pm

clav wrote:Feel free to prove me wrong by coming up with some really great nonspecific icons though :)


couldn't resist the bait :)

Image this was don fairly quickly it could be vastly improved upon ;)

using png's semi transparencies it could blend into the background colour... cept if the background is black.. in which case a white semi transparent outline over the image should fix the issue :)

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

Post Posted February 11th, 2003, 2:33 am

Ii've uploaded screenshots to:
http://clav.co.uk/digger.jpg
http://clav.co.uk/styleswitcher.jpg
respectively. They're jpegs using quite a lot of compression to keep the file size down.


priior:
Do you mean for that icon to be used straight on the toolbar for digger, or to be overlayed on a standard button for the theme as Chris suggested?

Chris:
Good idea. Perhaps a few different alpha pngs per extension (in case some of them don't look good with some themes). For instance a spade, a little arrow etc for Digger?

dunda
 
Posts: 126
Joined: January 27th, 2003, 7:22 am

Post Posted February 11th, 2003, 3:25 am

Is there any way to have users stylesheets available in such a way too?

richwklein
 
Posts: 331
Joined: November 24th, 2002, 8:20 pm
Location: Iowa

Post Posted February 11th, 2003, 8:26 am

I created a bug several months ago about overlaying images for extensions. It was closed as won't fix.

richwklein
 
Posts: 331
Joined: November 24th, 2002, 8:20 pm
Location: Iowa

Post Posted February 11th, 2003, 8:39 am

Could you add the following to the digger overlay:

<toolbaritem id="go-container" align="center" class="chromeclass-location">
<button id="go-button" class="button-toolbar" type="menu-button" popup="digger-menu"/>
</toolbaritem>

This adds the digger function to the go menu. I much prefer that to having a separate button.

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

Post Posted February 11th, 2003, 10:12 am

richwklein wrote:I created a bug several months ago about overlaying images for extensions. It was closed as won't fix.


I think it should be possible to do this in the themes. The extension could set the list-style-image property of the toolbar button to png with alpha transparency, then the theme could specify a background-image. I haven't tried it, but I can't see why it wouldn't work.

cdn

User avatar
 
Posts: 999
Joined: November 4th, 2002, 5:47 pm
Location: UK

Post Posted February 11th, 2003, 10:28 am

richwklein wrote:Could you add the following to the digger overlay:

<toolbaritem id="go-container" align="center" class="chromeclass-location">
<button id="go-button" class="button-toolbar" type="menu-button" popup="digger-menu"/>
</toolbaritem>

This adds the digger function to the go menu. I much prefer that to having a separate button.


I would think that just

<button id="go-button" context="digger-menu"/>

would be better, the quoted xul messes up the go button in pinball quite a bit

richwklein
 
Posts: 331
Joined: November 24th, 2002, 8:20 pm
Location: Iowa

Post Posted February 11th, 2003, 10:29 am

cdn, could you turn off html on your pevious post? All I see is a button.

cdn

User avatar
 
Posts: 999
Joined: November 4th, 2002, 5:47 pm
Location: UK

Post Posted February 11th, 2003, 10:30 am

just did, as you posted

cdn

User avatar
 
Posts: 999
Joined: November 4th, 2002, 5:47 pm
Location: UK

Post Posted February 11th, 2003, 10:31 am

full
Code: Select all
<?xml version="1.0"?>

<?xml-stylesheet href="chrome://digger/skin/digger.css" type="text/css"?>
 
<!DOCTYPE overlay SYSTEM "chrome://digger/locale/digger.dtd">

<overlay id="diggerBrowserOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <script type="application/x-javascript" src="chrome://digger/content/digger.js"/>

  <button id="go-button" context="digger-menu"/>

  <toolbarpalette id="BrowserToolbarPalette">
    <toolbarbutton
        id="digger-button"
        class="toolbarbutton-1"
        label="&digger.label;"
        tooltiptext="&digger.tooltip;"
        popup="digger-menu"
        />
  </toolbarpalette>

  <window id="main-window">
    <popupset id="diggerMenuPopupset">
      <popup id="digger-menu" oncommand="diggerMenuCommand(event);" onpopupshowing="diggerBuildMenu();">
        <menuitem id="digger-clear-url" label="&diggerClear.label;"/>
      </popup>
    </popupset>
  </window>

</overlay>

richwklein
 
Posts: 331
Joined: November 24th, 2002, 8:20 pm
Location: Iowa

Post Posted February 11th, 2003, 10:39 am

The -moz-box-orient: vertical !important; in the below pinball css is what puts the arrow in the wrong place.

#go-button {
-moz-appearance: toolbarbutton;
background-color: transparent;
list-style-image: url("chrome://browser/skin/pb-btn1.png");
-moz-image-region: rect(1px 252px 22px 216px) !important;
-moz-box-orient: vertical !important;
-moz-appearance: none;
}

[Edit]

I just tried it with several other themes, and it seems to mess up several of them. cdn's change works better :wink:

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest