Closed Bug 406868 Opened 17 years ago Closed 7 years ago

Fallback scheme for -moz-icon

Categories

(Core :: Graphics: ImageLib, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: micmon, Unassigned)

Details

Firefox currently depends on icons from a freedesktop icon spec compliant theme to display mime icons in ftp listings, the applications dialog and the download manager. As such a theme is not in the dependency list for Firefox 3, we need a way to fall back to chrome-supplied icons.

Besides the mime icons, this would also allow us to use fdo spec icons for some other icons (non-GTK stock, like window-new and tab-new), which would further improve the native look and feel.
Component: Widget: Gtk → ImageLib
QA Contact: gtk → imagelib
Another thing were this would be very helpful would be the dialog icons, like "warning", "information", "error". GTK has them all, but only in 48x48. Firefox needs them in about every size, so we cannot just use the GTK icon.

Having a fallback scheme would make it possible to display the icons from a fdo theme and ship/use smaller sizer matching the GTK style as a fallback.
Component: ImageLib → Widget: Gtk
QA Contact: imagelib → gtk
Component: Widget: Gtk → ImageLib
QA Contact: gtk → imagelib
We could just extend -moz-icon so it can scale the icons.
Scaling would look bad. And it would not fix the original purpose of the bug: displaying native mime icons if available, display fallback(s) from chrome if not.
This bug could also cover another extension of the -moz-icon scheme: in gtk, there's a mean to pass to the lookup function a list of icons instead of only one; it then tries to find (in list order) an icon in the current theme, and tries them all before doing the fallback to inherited themes.

See http://library.gnome.org/devel/gtk/stable/GtkIconTheme.html#gtk-icon-theme-choose-icon

It could enable us to ask for gtk-go-back-ltr, and if not present, gtk-go-back, and if the theme has neither, search in gnome default, etc... (note that in this case, it exchanges "icons in wrong theme" with "icons in wrong direction for RTL users, or LTR users with a RTL gtk locale", see bug 411957), so it may not be a good solution; the extended scheme could nevertheless be useful
I think Firefox (after 3.0) needs a named icon system. You would define something like "icon_back", and assign some possible icon location to it, such as "use the FDO theme icon named go-back, if not, use the gtk stock icon named gtk-go-back, if not, use the bundeled icon foo".
For GNOME 2.24 and the next GTK release, one of the goals is to get rid of the gtk-* stock icon names as the default way to display stock icons. The legacy names will still be supported through the future GTK 2.x releases, but it will be encouraged to use the FDO names.

GTK will probably get the same translation table I mentioned in comment #5. If Firefox 4 had this, too, we could make use of many more system icon theme icons and still provide a full fallback system.

Making use of more system theme (non gtk stock) icons would especially make sense for thunderbird: FDO themes have all those mail-* related icons, none of which we could currently use, because they are not GTK stock.
No longer relevant with Photon theme.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.