# Ubuntunion GTK theme
#
# Based roughly on Clearlooks, but almost completely modified
#
# Author:
# Philipp Merkel
#
# Feel free to modify and share!

gtk-icon-sizes = "panel-menu=24,24"

gtk_color_scheme = "fg_color:#101010\nbg_color:#FFF\nbase_color:#FFF\ntext_color:#000\nselected_bg_color:#FCAF3E\nselected_fg_color:#FFF\ntooltip_bg_color:#FFF\ntooltip_fg_color:#000\norange_color:#FCAF3E\nmetacity_frame_color:#CC863E\nextra_view_widgets_color:#D3D7CF"

style "ubuntunion-default"
{
	########
	# Style Properties
	########
	GtkButton      ::child-displacement-x = 1
	GtkButton      ::child-displacement-y = 1
	GtkButton      ::default-border       = { 0, 0, 0, 0 }
	GtkCheckButton ::indicator-size       = 14

	GtkPaned       ::handle-size          = 5

	GtkRange       ::trough-border        = 0
	GtkRange       ::slider-width         = 15
	GtkRange       ::stepper-size         = 15

	GtkScale       ::slider-length        = 23
	GtkScale       ::trough-side-details  = 1
	GtkScrollbar   ::min-slider-length    = 30

	GtkMenuBar     ::internal-padding     = 2
	GtkExpander    ::expander-size        = 16
	GtkToolbar     ::internal-padding     = 1
	GtkTreeView    ::expander-size        = 14
	GtkTreeView    ::vertical-separator   = 0

	GtkMenu        ::horizontal-padding   = 0
	GtkMenu        ::vertical-padding     = 0

	# Glow the tasklist by changing the color, instead of overlaying it with a rectangle
	WnckTasklist   ::fade-overlay-rect    = 0

	xthickness = 1
	ythickness = 1


	fg[NORMAL]        = @fg_color
	fg[PRELIGHT]      = @fg_color
	fg[SELECTED]      = @selected_fg_color
	fg[ACTIVE]        = @fg_color
	fg[INSENSITIVE]   = darker (@bg_color)

	bg[NORMAL]        = @bg_color
	bg[PRELIGHT]      = shade (1.02, @bg_color)
	bg[SELECTED]	  = @selected_bg_color
	bg[INSENSITIVE]   = @bg_color
	bg[ACTIVE]        = shade (0.9, @bg_color)

	base[NORMAL]      = @base_color
	base[PRELIGHT]    = shade (0.95, @bg_color)
	base[ACTIVE]      = shade (0.9, @selected_bg_color)
	base[SELECTED]    = @selected_bg_color
	base[INSENSITIVE] = @bg_color

	text[NORMAL]      = @text_color
	text[PRELIGHT]    = @text_color
	text[ACTIVE]      = @selected_fg_color
	text[SELECTED]    = @selected_fg_color
	text[INSENSITIVE] = darker (@bg_color)

	engine "pixmap"
	{
		image
		{
                	function = VLINE
            		recolorable = TRUE 
            		file = "vertical-seperator.png"
            		border = { 1, 0, 0, 0 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = HLINE
            		recolorable = TRUE 
            		file = "horizontal-seperator.png"
            		border = { 0, 0, 1, 0 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SHADOW
		}
		image
		{
			function = SHADOW_GAP
		}

		image
		{
                	function = HANDLE
            		recolorable = TRUE 
            		orientation = VERTICAL
            		file = "vertical-grip.png"
            		border = { 0, 4, 0, 0 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = HANDLE
            		recolorable = TRUE 
            		orientation = HORIZONTAL
            		file = "horizontal-grip.png"
            		border = { 0, 0, 0, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}

	}

}

style "ubuntunion-button" {
	xthickness   = 3
	ythickness   = 3
	
	#GtkButton::default-outside-border = { 2,2,2,2 }
	GtkButton::default-border = { 1,1,1,1 }

	/*bg[NORMAL]   = shade (1.04, @bg_color) # "#f6f4f1"
	bg[PRELIGHT] = shade (1.06, @bg_color)
	bg[ACTIVE]   = shade (0.85, @bg_color)*/

	engine "pixmap"
	{

		image
		{
			detail = "buttondefault"
                	function = BOX
            		recolorable = TRUE 
            		file = "button-default.png"
            		border = { 5, 5, 5, 5 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "button-normal.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = NORMAL
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "button-hover.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = PRELIGHT
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "button-down.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = ACTIVE
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "button-insens.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = INSENSITIVE
        	}
	}
}

style "ubuntunion-checkbutton" {
	xthickness   = 2
	ythickness   = 2

	/*bg[NORMAL]   = shade (1.04, @bg_color) # "#f6f4f1"
	bg[PRELIGHT] = shade (1.06, @bg_color)
	bg[ACTIVE]   = shade (0.85, @bg_color)*/

	engine "pixmap"
	{

		image
		{
                	function = CHECK
            		recolorable = TRUE 
            		shadow = OUT
            		file = "button-normal.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = NORMAL
        	}
		image
		{
                	function = CHECK
            		shadow = OUT
            		recolorable = TRUE 
            		file = "button-hover.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = PRELIGHT
        	}
		image
		{
                	function = CHECK
            		shadow = OUT
            		recolorable = TRUE 
            		file = "button-down.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = ACTIVE
        	}
		image
		{
                	function = CHECK
            		shadow = OUT
            		recolorable = TRUE 
            		file = "button-insens.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = INSENSITIVE
        	}
		image
		{
                	function = CHECK
            		recolorable = TRUE 
            		shadow = IN
            		file = "button-pressed.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		overlay_file = "checkmark.png"
            		overlay_stretch = FALSE
            		state = NORMAL
        	}
		image
		{
                	function = CHECK
            		shadow = IN
            		recolorable = TRUE 
            		file = "button-pressed-hover.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		overlay_file = "checkmark.png"
            		overlay_stretch = FALSE
            		state = PRELIGHT
        	}
		image
		{
                	function = CHECK
            		shadow = IN
            		recolorable = TRUE 
            		file = "button-down.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		overlay_file = "checkmark-down.png"
            		overlay_stretch = FALSE
            		state = ACTIVE
        	}
		image
		{
                	function = CHECK
            		shadow = IN
            		recolorable = TRUE 
            		file = "button-pressed-insens.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		overlay_file = "checkmark-insens.png"
            		overlay_stretch = FALSE
            		state = INSENSITIVE
        	}

	}
}

style "ubuntunion-radiobutton" {
	xthickness   = 2
	ythickness   = 2

	/*bg[NORMAL]   = shade (1.04, @bg_color) # "#f6f4f1"
	bg[PRELIGHT] = shade (1.06, @bg_color)
	bg[ACTIVE]   = shade (0.85, @bg_color)*/

	engine "pixmap"
	{

		image
		{
                	function = OPTION
            		recolorable = TRUE 
            		shadow = OUT
            		overlay_file = "radio-normal.png"
            		overlay_stretch = FALSE
            		state = NORMAL
        	}
		image
		{
                	function = OPTION
            		shadow = OUT
            		recolorable = TRUE 
            		overlay_file = "radio-hover.png"
            		overlay_stretch = FALSE
            		state = PRELIGHT
        	}
		image
		{
                	function = OPTION
            		shadow = OUT
            		recolorable = TRUE 
            		overlay_file = "radio-down.png"
            		overlay_stretch = FALSE
            		state = ACTIVE
        	}
		image
		{
                	function = OPTION
            		shadow = OUT
            		recolorable = TRUE 
            		overlay_file = "radio-insens.png"
            		overlay_stretch = FALSE
            		state = INSENSITIVE
        	}
		image
		{
                	function = OPTION
            		recolorable = TRUE 
            		shadow = IN
            		overlay_file = "radio-pressed.png"
            		overlay_stretch = FALSE
            		state = NORMAL
        	}
		image
		{
                	function = OPTION
            		shadow = IN
            		recolorable = TRUE 
            		overlay_file = "radio-pressed-hover.png"
            		overlay_stretch = FALSE
            		state = PRELIGHT
        	}
		image
		{
                	function = OPTION
            		shadow = IN
            		recolorable = TRUE 
            		overlay_file = "radio-pressed-down.png"
            		overlay_stretch = FALSE
            		state = ACTIVE
        	}
		image
		{
                	function = OPTION
            		shadow = IN
            		recolorable = TRUE 
            		overlay_file = "radio-pressed-insens.png"
            		overlay_stretch = FALSE
            		state = INSENSITIVE
        	}

	}
}

style "ubuntunion-togglebutton" = "ubuntunion-button" {
	engine "pixmap"
	{
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		shadow = IN
            		state= PRELIGHT
            		file = "button-pressed-hover.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		shadow = IN
            		state= INSENSITIVE
            		file = "button-pressed-insens.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		shadow = IN
            		file = "button-pressed.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
       }
}

style "ubuntunion-entry"  {
	xthickness   = 2
	ythickness   = 2

	GtkWidget::interior_focus	= 0

	engine "pixmap"
	{
		image
		{
                	function = SHADOW
            		recolorable = TRUE 
            		file = "entry.png"
            		border = { 4, 5, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = FOCUS
            		recolorable = TRUE 
            		file = "entry-focus.png"
            		border = { 4, 5, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
       }
}

style "ubuntunion-comboboxentry-entry"  {
	xthickness   = 2
	ythickness   = 2

	GtkWidget::interior_focus	= 0

	engine "pixmap"
	{
		image
		{
                	function = SHADOW
            		state = INSENSITIVE
            		recolorable = TRUE 
            		file = "cbe-entry-insensitive.png"
            		border = { 4, 0, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = SHADOW
            		recolorable = TRUE 
            		file = "cbe-entry.png"
            		border = { 4, 0, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = FOCUS
            		recolorable = TRUE 
            		file = "cbe-entry-focus.png"
            		border = { 4, 0, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
       }
}

style "ubuntunion-comboboxentry-button" {

	engine "pixmap"
	{

		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "cbe-button-normal.png"
            		border = { 1, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = NORMAL
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "cbe-button-hover.png"
            		border = { 1, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = PRELIGHT
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "cbe-button-down.png"
            		border = { 1, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = ACTIVE
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "cbe-button-insens.png"
            		border = { 1, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = INSENSITIVE
        	}
	}
}

style "ubuntunion-wide"
{
	xthickness = 2
	ythickness = 2
}

style "ubuntunion-wider"
{
	xthickness = 3
	ythickness = 3
}


style "ubuntunion-notebook" = "ubuntunion-notebook-bg"
{
	xthickness = 3
	ythickness = 3
  engine "pixmap" 
    {

    image 
      {
     function			= EXTENSION
	recolorable		= TRUE
	state			= ACTIVE
	file					= "notebook-tab-top.png"
	border			= { 3,3,3,0}
	stretch			= TRUE
	gap_side			= BOTTOM
      }
    image 
      {
     function			= EXTENSION
	recolorable		= TRUE
	state			= ACTIVE
	file					= "notebook-tab-bottom.png"
	border			= { 3,3,0,3}
	stretch			= TRUE
	gap_side			= TOP
      }
    image 
      {
     function			= EXTENSION
	recolorable		= TRUE
	state			= ACTIVE
	file					= "notebook-tab-left.png"
	border			= {  3,0,3,3}
	stretch			= TRUE
	gap_side			= RIGHT
      }
    image 
      {
     function			= EXTENSION
	recolorable		= TRUE
	state			= ACTIVE
	file					= "notebook-tab-right.png"
	border			= {  0,3,3,3}
	stretch			= TRUE
	gap_side			= LEFT
      }

    image 
      {
     function			= EXTENSION
	recolorable		= TRUE
	file					= "notebook-active-tab-top.png"
	border			= { 4,4,4,0}
	stretch			= TRUE
	gap_side			= BOTTOM
      }
    image 
      {
     function			= EXTENSION
	recolorable		= TRUE
	file					= "notebook-active-tab-bottom.png"
	border			= { 4,4,0,4}
	stretch			= TRUE
	gap_side			= TOP
      }
    image 
      {
     function			= EXTENSION
	recolorable		= TRUE
	file					= "notebook-active-tab-left.png"
	border			= {  4,0,4,4}
	stretch			= TRUE
	gap_side			= RIGHT
      }
    image 
      {
     function			= EXTENSION
	recolorable		= TRUE
	file					= "notebook-active-tab-right.png"
	border			= {  0,4,4,4}
	stretch			= TRUE
	gap_side			= LEFT
      }

    image 
      {
     function				= BOX_GAP
	recolorable			= TRUE
	file				= "notebook-bg-top.png" 
	border				= { 0, 0, 1, 1 }
	stretch				= TRUE
	gap_file			= "gap.png"
	gap_border     			= { 0, 0, 0, 0 }
	gap_start_file			= "seperator-right.png"
	gap_start_border		= { 0, 0, 0, 0 }
	gap_end_file			= "seperator-left.png"
	gap_end_border			= { 0, 0, 0, 0 }
	gap_side			= TOP
      }
    image 
      {
     function				= BOX_GAP
	recolorable			= TRUE
	file				= "notebook-bg-bottom.png" 
	border				= { 0, 0, 1, 1 }
	stretch				= TRUE
	gap_file			= "gap.png"
	gap_border     			= { 0, 0, 0, 0 }
	gap_start_file			= "seperator-right.png"
	gap_start_border		= { 0, 0, 0, 0 }
	gap_end_file			= "seperator-left.png"
	gap_end_border			= { 0, 0, 0, 0 }
	gap_side			= BOTTOM
      }
    image 
      {
     function				= BOX_GAP
	recolorable			= TRUE
	file				= "notebook-bg-left.png" 
	border				= { 1, 1, 0, 0 }
	stretch				= TRUE
	gap_file			= "gap.png"
	gap_border     			= { 0, 0, 0, 0 }
	gap_start_file			= "seperator-bottom.png"
	gap_start_border		= { 0, 0, 0, 0 }
	gap_end_file			= "seperator-top.png"
	gap_end_border			= { 0, 0, 0, 0 }
	gap_side			= LEFT
      }
    image 
      {
     function				= BOX_GAP
	recolorable			= TRUE
	file				= "notebook-bg-right.png" 
	border				= { 1, 1, 0, 0 }
	stretch				= TRUE
	gap_file			= "gap.png"
	gap_border     			= { 0, 0, 0, 0 }
	gap_start_file			= "seperator-bottom.png"
	gap_start_border		= { 0, 0, 0, 0 }
	gap_end_file			= "seperator-top.png"
	gap_end_border			= { 0, 0, 0, 0 }
	gap_side			= RIGHT
      }


    image 
      {
     function			= BOX
	recolorable		= TRUE
	file					= "empty.png"
	border			= { 0,0,0,0 }
	stretch			= TRUE
      }
  }
}

style "ubuntunion-tasklist"
{
	xthickness = 5
	ythickness = 3
}

style "ubuntunion-menu"
{
	xthickness = 0
	ythickness = 0

	bg[NORMAL] = @bg_color

	engine "pixmap"
	{
		image
		{
			function = SHADOW
            		file = "menu.png"
            		border = { 1, 1, 1, 1 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
       }
}

style "ubuntunion-menu-item"
{
	xthickness = 2
	ythickness = 3

	fg[PRELIGHT] = @selected_fg_color
	
	engine "pixmap"
	{
		image
		{
			function = BOX
            		file = "highlight-horizontal.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
       }
	
	
}

style "ubuntunion-separator-menu-item"
{
	GtkSeparatorMenuItem::horizontal-padding = 0
	# We are setting the desired height by using wide-separators
	# There is no other way to get the odd height ...
	GtkWidget::wide-separators = 1
	GtkWidget::separator-width = 1
	GtkWidget::separator-height = 5
	xthickness = 1
	ythickness = 0

	engine "pixmap"
	{
		image
		{
			function = BOX
            		file = "menu-seperator.png"
            		border = { 0, 0, 3, 0 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
       }

}

style "ubuntunion-treeview"
{
}

# Based on the default style so that the colors from the button
# style are overriden again.
style "ubuntunion-treeview-header" = "ubuntunion-default"
{
	xthickness = 2
	ythickness = 1

}

style "ubuntunion-frame-title"
{
	fg[NORMAL] = lighter (@fg_color)
}

style "ubuntunion-tooltips"
{
	xthickness = 4
	ythickness = 4

	bg[NORMAL] = "#E7E9E5"
	fg[NORMAL] = "#000"
#	bg[NORMAL] = "#FCAF3E"
#	fg[NORMAL] = "#FFF"


	engine "pixmap"
	{
		image
		{
#			function = BOX
            		file = "tooltip.png"
            		border = { 1, 1, 1, 1 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
        }

}

style "ubuntunion-progressbar"
{
	xthickness = 0
	ythickness = 0

	fg[PRELIGHT] = @selected_fg_color


	engine "pixmap"
	{
		image
		{
			function = BOX
			detail = "trough"
            		file = "progressbar-full.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = BOX
#			orientation = HORIZONTAL
			detail = "bar"
            		file = "highlight-horizontal.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
#		image
#		{
#			function = BOX
#			orientation = VERTICAL
#			detail = "bar"
#        		file = "highlight-vertical.png"
#          		border = { 0, 0, 3, 3 } # = {Left, Right, Top, Bottom} 
#         		stretch = TRUE 
#	    	}
       }

}

style "ubuntunion-statusbar"
{
	engine "pixmap"
	{
		#image
		#{
                #	function = SHADOW
            	#	recolorable = TRUE 
            	#	file = "statusbar-bg.png"
            	#	border = { 0, 0, 1, 0 } # = {Left, Right, Top, Bottom} 
            	#	stretch = TRUE 
        	#}
	}
}

style "ubuntunion-comboboxentry"
{
}

style "ubuntunion-spinbutton"
{
}

style "ubuntunion-scale"
{

}

style "ubuntunion-hscale"
{
	engine "pixmap"
	{
		image
		{
			function = SLIDER
			state = PRELIGHT
            		file = "highlight-horizontal.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = ACTIVE
            		file = "highlight-horizontal.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = NORMAL
            		file = "slider.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
#		image
#		{
#			detail = "trough-fill-level"
#			function = BOX
#			shadow = OUT
#           		file = "horizontal-scale-fill.png"
#            		border = { 4, 4, 7, 7 } # = {Left, Right, Top, Bottom} 
#            		stretch = TRUE 
#        	}
		image
		{
			function = BOX
           		file = "horizontal-scale-bg.png"
           		border = { 4, 4, 7, 7 } # = {Left, Right, Top, Bottom} 
           		stretch = TRUE 
  	     	}
	
	}
}

style "ubuntunion-vscale"
{
	engine "pixmap"
	{
		image
		{
			function = SLIDER
			state = PRELIGHT
            		file = "highlight-vertical.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = ACTIVE
            		file = "highlight-vertical.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = NORMAL
            		file = "slider.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = BOX
            		file = "vertical-scale-bg.png"
            		border = { 7, 7, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
	}
}

style "ubuntunion-scrollbar"
{

	engine "pixmap"
	{

		image
		{
                	function = BOX
            		recolorable = FALSE
            		file = "white.png"
            		border = { 0, 0, 0, 0 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = NORMAL
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "button-hover.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = PRELIGHT
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "button-down.png"
            		border = { 4, 4, 4, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = ACTIVE
        	}
		image
		{
                	function = BOX
            		recolorable = TRUE 
            		file = "white.png"
            		border = { 0, 0, 0, 0 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
            		state = INSENSITIVE
        	}
	}


}

style "ubuntunion-hscrollbar"
{

	engine "pixmap"
	{
		image
		{
			function = BOX
			detail = "trough"
            		file = "scrollbar-horizontal.png"
            		border = { 0, 0, 1, 1 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = PRELIGHT
            		file = "highlight-horizontal.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = ACTIVE
            		file = "highlight-horizontal.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = NORMAL
            		file = "slider.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
       }

}

style "ubuntunion-vscrollbar"
{

	engine "pixmap"
	{
		image
		{
			function = BOX
			detail = "trough"
            		file = "scrollbar-vertical.png"
            		border = { 1, 1, 0, 0 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = PRELIGHT
            		file = "highlight-vertical.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = ACTIVE
            		file = "highlight-vertical.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
			function = SLIDER
			state = NORMAL
            		file = "slider.png"
            		border = { 2, 2, 2, 2 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
       }

}

style "ubuntunion-menubar"
{

	engine "pixmap"
	{
		image
		{
                	function = BOX
            		orientation = HORIZONTAL
            		recolorable = TRUE 
            		file = "toolbar-bg.png"
            		border = { 0, 0, 0, 1 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = BOX
            		orientation = VERTICAL
            		recolorable = TRUE 
            		file = "vertical-toolbar-bg.png"
            		border = { 0, 1, 0, 0 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
#            		overlay_file = "thumb-h-scrollbar.png"
#            		overlay_stretch = FALSE
        	}
	}

}

style "ubuntunion-seperator" = "ubuntunion-default"
{
}

style "ubuntunion-paned"
{

	engine "pixmap"
	{
		image
		{
                	function = HANDLE
            		recolorable = TRUE 
            		orientation = VERTICAL
            		file = "vertical-grip.png"
            		border = { 0, 4, 0, 0 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
		image
		{
                	function = HANDLE
            		recolorable = TRUE 
            		orientation = HORIZONTAL
            		file = "horizontal-grip.png"
            		border = { 0, 0, 0, 4 } # = {Left, Right, Top, Bottom} 
            		stretch = TRUE 
        	}
	}

}

style "ubuntunion-noframe"
{

	engine "pixmap"
	{
		image
		{
			function = SHADOW
		}
		image
		{
			function = SHADOW_GAP
		}
	}

}


style "ubuntunion-nautilus-location"
{
	bg[NORMAL] = mix(0.60, shade (1.05,@bg_color), @selected_bg_color)
}


#########################################
# Matches
#########################################

# ubuntunion default style is applied to every widget
class "GtkWidget"    style "ubuntunion-default"

# Increase the x/ythickness in some widgets
class "GtkRange"     style "ubuntunion-wide"

class "GtkSpinButton"  style "ubuntunion-spinbutton"
class "GtkScale"       style "ubuntunion-scale"
class "GtkVScale"      style "ubuntunion-vscale"
class "GtkHScale"      style "ubuntunion-hscale"
class "GtkScrollbar"   style "ubuntunion-scrollbar"
class "GtkVScrollbar"  style "ubuntunion-vscrollbar"
class "GtkHScrollbar"  style "ubuntunion-hscrollbar"

class "GtkPaned"			style "ubuntunion-paned"
class "GtkScrolledWindow"		style "ubuntunion-noframe"
class "GtkFrame"			style "ubuntunion-noframe"
class "GtkSeparator"			style "ubuntunion-seperator"
widget_class "GtkDialog.*GtkScrolledWindow" style "ubuntunion-default"

# General matching following, the order is choosen so that the right styles override each other
# eg. progressbar needs to be more important then the menu match.


widget_class "*<GtkButton>"      	style "ubuntunion-button"
widget_class "*<GtkToggleButton>"      	style "ubuntunion-togglebutton"
widget_class "*<GtkCheckButton>"      	style "ubuntunion-checkbutton"
widget_class "*<GtkRadioButton>"      	style "ubuntunion-radiobutton"
widget_class "*<GtkNotebook>"   	style "ubuntunion-notebook"
widget_class "*<GtkStatusbar>*"	 	style "ubuntunion-statusbar"

widget_class "*<GtkEntry>"	 	style "ubuntunion-entry"
widget_class "*<GtkEntry>.*"	 	style "ubuntunion-default"

widget_class "*<GtkComboBox>*<GtkButton>"      	style "ubuntunion-button"
widget_class "*<GtkOptionMenu>"		      	style "ubuntunion-button"
widget_class "*<GtkComboBoxEntry>*<GtkEntry>" style "ubuntunion-comboboxentry-entry"
widget_class "*<GtkComboBoxEntry>*<GtkButton>" style "ubuntunion-comboboxentry-button"
widget_class "*<GtkCombo>*<GtkEntry>" style "ubuntunion-comboboxentry-entry"
widget_class "*<GtkCombo>*<GtkButton>" style "ubuntunion-comboboxentry-button"

widget_class "*<GtkMenuBar>"		style "ubuntunion-menubar"
widget_class "*<GtkToolbar>"		style "ubuntunion-menubar"
class "BonoboDockItem" 			style "ubuntunion-menubar"
#class "GtkHandleBox"			style "ubuntunion-handle"

widget_class "*<GtkMenu>*"              style "ubuntunion-menu"
widget_class "*<GtkMenuItem>*"          style "ubuntunion-menu-item"
widget_class "*<GtkSeparatorMenuItem>*" style "ubuntunion-separator-menu-item"

widget_class "*.<GtkFrame>.<GtkLabel>" style "ubuntunion-frame-title"
widget_class "*.<GtkTreeView>*"        style "ubuntunion-treeview"

widget_class "*<GtkProgressBar>"       style "ubuntunion-progressbar"

# Treeview header
widget_class "*.<GtkTreeView>.<GtkButton>" style "ubuntunion-treeview-header"
widget_class "*.<GtkCTree>.<GtkButton>"    style "ubuntunion-treeview-header"
widget_class "*.<GtkList>.<GtkButton>"     style "ubuntunion-treeview-header"
widget_class "*.<GtkCList>.<GtkButton>"    style "ubuntunion-treeview-header"

# Workarounds for Evolution
widget_class "*.ETable.ECanvas"    style "ubuntunion-treeview-header"
widget_class "*.ETree.ECanvas"    style "ubuntunion-treeview-header"

# The window of the tooltip is called "gtk-tooltip"
widget "gtk-tooltip*" style "ubuntunion-tooltips"

###################################################
# Special cases and work arounds
###################################################

# Special case the nautilus-extra-view-widget
# ToDo: A more generic approach for all applications that have a widget like this.
widget "*.nautilus-extra-view-widget" style : highest "ubuntunion-nautilus-location"

# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
# Note that the work around assumes that the combobox is _not_ in
# appears-as-list mode.
# Similar hack also in the menuitem style.
# This style does not affect GtkComboBoxEntry, it does have an effect
# on comboboxes in appears-as-list mode though.
style "ubuntunion-text-is-fg-color-workaround"
{
	text[NORMAL]      = @fg_color
	text[PRELIGHT]    = @fg_color
	text[SELECTED]    = @selected_fg_color
	text[ACTIVE]      = @fg_color
	text[INSENSITIVE] = darker (@bg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>"   style "ubuntunion-text-is-fg-color-workaround"

style "ubuntunion-menuitem-text-is-fg-color-workaround"
{
	text[NORMAL]        = @fg_color
	text[PRELIGHT]      = @selected_fg_color
	text[SELECTED]      = @selected_fg_color
	text[ACTIVE]        = @fg_color
	text[INSENSITIVE]   = darker (@bg_color)
}
widget "*.gtk-combobox-popup-menu.*"   style "ubuntunion-menuitem-text-is-fg-color-workaround"

# Work around the usage of GtkLabel inside GtkListItems to display text.
# This breaks because the label is shown on a background that is based on the
# base color set.
style "ubuntunion-fg-is-text-color-workaround"
{
	fg[NORMAL]      = @text_color
	fg[PRELIGHT]    = @text_color
	fg[ACTIVE]      = @selected_fg_color
	fg[SELECTED]    = @selected_fg_color
	fg[INSENSITIVE] = darker (@bg_color)
}
widget_class "*<GtkListItem>*" style "ubuntunion-fg-is-text-color-workaround"
# The same problem also exists for GtkCList and GtkCTree
# Only match GtkCList and not the parent widgets, because that would also change the headers.
widget_class "*<GtkCList>" style "ubuntunion-fg-is-text-color-workaround"


