Development:Third-Party Tab Themes

From Camino Wiki
Jump to: navigation, search

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.

Contents

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.tiff - 24 px high
  • B - tab_button_divider.tiff - 2 px wide
  • C - Tri-state tab close buttons
    • tab_close.tiff - 14 x 14 px
    • tab_close_hover.tiff - 14 x 14 px
    • tab_close_pressed.tiff - 14 x 14 px
  • D - Dual-state inactive tab
    • tab_bar_bg.tiff - 2 px wide
    • tab_hover.tiff - 2 px wide
  • E - tab_left_side.tiff - 2 px wide
  • F - tab_active_bg.tiff - 2 px wide
  • G - tab_right_side.tiff - 2 px wide
  • H - tab_menu_button.tiff - 17 x 18 px
  • I - tab_scroll_button_left.tiff - 18 x 18 px
  • J - tab_scroll_button_right.tiff - 18 x 18 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.

Tab Scroll Buttons

The tab scroll buttons appear at the left edge and one-from-the-right-edge when there are more tabs than can be displayed in the current window-width.

Tab Menu Button

The tab menu button appears when there are more tabs than can fit in the current window-width. It is painted in the remaining space between the right scroll button and the right edge of 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.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox