Why does Mozilla look different to other GNOME and Gtk-based applications?
Any X11 and Gtk-based program can set the colours used in its windows. If a program wants to fit in with the rest of the desktop, though, then it has to use the system of theme engines that Gtk supports. A theme engine serves up skinning information to any program smart enough to take advantage of it. Since the skinning information is the same for all theme-engine enabled programs, all such programs have some common visual elements.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
In the Mozilla case, two theme engines are at work. There's the Gtk system, and then there's Mozilla's own skinning system, also called themes. The Mozilla theme engine is responsible for Mozilla-specific skins like Classic and Modern, as well as third party skins like SkyPilot. Each of these skins uses a generally fixed set of colours and images. To the Gtk theme engine, these Mozilla skins look like static information, so the theme engine adds nothing.
Mozilla's themes are built using CSS, and Mozilla has a new CSS style property called -moz-appearance. This extension forces Mozilla to consult the native theme engine (on Linux, the Gtk one) for skin information. By creating a Mozilla skin that makes use of this extension, the native theme information can "shine through" into Mozilla windows. In fact, the Classic skin uses -moz-appearance in several places, particularly in form elements and in scrollbars.The Classic skin also sets some colours and images directly, in order to be familiar to older Netscape 4.x users. So there isn't a skin that perfectly shows the underlying Gtk theme yet. In fact, native theme support is only 95% ready in Mozilla at this time. We're not far away, though, from being able to create a Transparent skin that uses -moz-appearance across the whole range of GUI widgets. Mozilla currently relies on the Gtk 1.2 libraries. Many GNOME programs use Gtk 1.2, so that's not a big deal. When Gtk 2.0 is supported though, Mozilla will come even closer to the look and feel of other GNOME tools.
Dig Deeper on Open source Web and application servers
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.