Open Bug 705070 Opened 13 years ago Updated 2 years ago

Firefox stock icons in the default theme does not use the GTK icon theme

Categories

(Firefox :: Theme, enhancement)

All
Linux
enhancement

Tracking

()

People

(Reporter: jagw40k, Unassigned)

References

Details

Firefox's default theme include Firefox-specific icons for icons that are not covered by GTK stock icons.
For instance, the icon for new tab and new window menu entry are not provided by GTK stock icons (both in GTK2 : http://developer.gnome.org/gtk/stable/gtk-Stock-Items.html and GTK3 : http://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html ).
However, it does so by using directly the icons.
It would be much better to add the icons to the hicolor theme (the theme to which GTK reverts to when an icon is not available anywhere else), and then call GTK to get the icon, as it would allow the GTK icon theme makers to provide replacement to those icons that match better the rest of their theme.
For instance, an icon theme for Gnome which already provides a window-new.png icon for Gnome application could make a symlink from window-new.png to moz-new-window.png (or whatever we are going to call it), so that the new window icons in Nautilus and Firefox are coherent.
A quick review on how theme is handled now :

- The default theme is included in the archive omni.ja, in chrome/browser/skin/classic/browser .
    > It contains a number of css files that describe the default theme, the main one being browser.css
    > It also contains all the default icons, and usually *many different icons are included in one single image*.

To make the default theme use GTK icon theme is very easy, it is just about modifying browser.css to replace some “list-style-image: url("chrome://browser/skin/something.png");” by some “list-style-image: url("moz-icon://stock/someotherthing");”.
The hard part is *to properly define fallback icons when the current GTK icon theme doesn't provide the icons we want*.


The GTK way of providing application-specific fallback icons is by using gtk_icon_theme_append_search_path(). But to do that, we need to have the default icons accessible to GTK, which mean that instead of having multiple icons within one single image file, and inside a compressed omni.ja, we would require to have an uncompressed folder containing one image file per icon. Is that possible ? What would be the drawbacks ? Why is almost everything contained in this omni.ja archive ?

An other way of doing things could be to have the css interpreter himself look if the icon is part of the GTK theme, the problem being that if the icon doesn't exist in the GTK theme, “moz-icon://stock/randomiconthatdoesntexist” will just use the “file not found” icon.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.