Difference between revisions of "Development:Third-Party Tab Themes"

From Camino Wiki
Jump to navigation Jump to search
(→‎Tab Close Buttons: add px from ian)
(→‎Tab Close Buttons: corrections)
Line 35: Line 35:
  
 
===Tab Close Buttons===
 
===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.  They are 4px from the edge of the tab and 4px from the edge of the site icon/progress spinner.
+
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 actual close buttons are only 12px wide; there is 1px of transparent margin on either side of the visible image.) The buttons are 4px from the edge of the tab and 4px from the edge of the site icon/progress spinner.
  
 
===Overflow Menu Button===
 
===Overflow Menu Button===

Revision as of 23:46, 1 January 2008

The tabbed browsing UI of Camino 1.0 and newer allows the use of custom of themes. The theming system for the tabs was designed to be both simple and flexible.

N.B. Note that these instructions and illustrations are correct as of Camino 1.5. There have been significant changes to the tab system in nightly builds following Camino 1.5. This documentation will be updated for such changes as time allows.

How does it work?

Camino's tab bar consists of one main image (tab_bar_bg) tiled across the width of the tab bar. The various parts of the tabs and the tab divider (tab_button_divider) are overlaid on top of the tab bar background (base).


Tab Layout Diagram


The tabs themselves are made up of several different components, as illustrated below:


Our Keen Tabs


  • A - tab_bar_bg.tif - 22 px high
  • B - tab_button_divider.tif - 2 px wide
  • C - Tri-state tab close buttons
    • tab_close.tif - 14 x 14 px
    • tab_close_hover.tif - 14 x 14 px
    • tab_close_pressed.tif - 14 x 14 px
  • D - Dual-state inactive tab
    • tab_bar_bg.tif - 2 px wide
    • tab_hover.tif - 2 px wide
  • E - tab_left_side.tif - 2 px wide
  • F - tab_active_bg.tif - 2 px wide
  • G - tab_right_side.tif - 2 px wide
  • H - tab_overflow.tif - 16 x 16 px

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.

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 actual close buttons are only 12px wide; there is 1px of transparent margin on either side of the visible image.) The buttons are 4px from the edge of the tab and 4px from the edge of the site icon/progress spinner.

Overflow Menu Button

The overflow menu button is painted in the remaining space on the tab bar.

Tab Bar

The base for the tab bar is tab_bar_bg, which is painted as a pattern (tiled) across the entire width of the bar. Then, at the ends of every tab, the tab_button_divider is painted.

Because the tab_bar_bg, tab_active_bg and tab_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.