Development:Third-Party Tab Themes

From Camino Wiki
Revision as of 15:05, 9 June 2007 by Sardisson (talk | contribs) (initial porting of japser's documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The tabbed browsing UI of Camino 1.0 and newer allows the use of custom of themes. The system that makes this happen was made to be flexible and simple.

How does it work?

As shown below, the tab base is tab_bar_bg painted as a pattern across the entire width of the tab bar. Then, at the ends of every tab, the tab_button_divider is painted.

<img src="docu/tab_theme2.jpg" alt="Tab Layout Diagram" width="450" height="100" />

Active Tab

The active tab consists of three objects. The sides of the tabs are painted using tab_left_side and tab_right_side. The middle part of the active tab is painted using tab_active_bg as a pattern.
<img src="tab_theme.jpg" alt="Our Keen Tabs" width="450" height="253" />

Tab Close Buttons

The close tab button has three separate states: one for the general inactive state, one for the hover state, and one for the clicked state. The overflow menu button is painted as is.

Tab Bar

Because the bar_bg, active_bg and hover images are painted as patterns, there is great freedom in what can be done. These patterns can be made as wide as you wish, which can increase your flexibility when designing tab themes. It is also possible to make the divider and side images wider than two pixels, but this could cause the expected behavior to change.