# Hanso theme
# (c) 2009 Rico Sta. Cruz, Kido Mariano, James Schriver
# Licensed under the GPL.
# Requires Murrine v0.91.0

gtk_color_scheme = "fg_color:#323232\nbg_color:#F0EBE2\nbase_color:#fff\ntext_color:#323232\nselected_bg_color:#75645B\nselected_fg_color:#fff\ntooltip_bg_color:#D5C1B6\ntooltip_fg_color:#323232\ntheme_color_04:#a9a49c\ntheme_color_26:#292421\ntheme_color_27:#706b64"

style "default"
{
	xthickness = 1
	ythickness = 1

	GtkScrolledWindow ::scrollbar-spacing = 0
	GtkScrolledWindow ::scrollbar-within-bevel = 0
	
	GtkButton::child-displacement-x = 1
	GtkButton::child-displacement-y = 1
	GtkButton::default-border = { 0, 0, 0, 0 }

	GtkCheckButton::indicator-size = 14

	GtkPaned::handle-size = 6

	GtkRange::trough-border = 1
	GtkRange::slider-width = 12
	GtkRange::stepper-size = 12
   	GtkRange::trough-under-steppers = 1

	GtkScale::slider-length = 18
	GtkScale::trough-side-details = 1

	GtkScrollbar::min-slider-length = 30
	GtkMenuBar::internal-padding = 0
	GtkExpander::expander-size = 15
	GtkToolbar::internal-padding = 1
	GtkTreeView::expander-size = 15
	GtkTreeView::vertical-separator = 0

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

#	GtkMenuBar::shadow_type = GTK_SHADOW_NONE
#	GtkToolbar::shadow_type = GTK_SHADOW_NONE

	WnckTasklist::fade-overlay-rect = 0
	# The following line hints to gecko (and possibly other appliations)
	# that the entry should be drawn transparently on the canvas.
	# Without this, gecko will fill in the background of the entry.
	GtkEntry::honors-transparent-bg-hint = 1

  	GtkEntry::progress-border = { 2, 2, 2, 2 }

	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.04, @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]      = mix (0.7, @selected_bg_color, @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 "murrine" 
	{
		animation           = TRUE  # FALSE = disabled, TRUE = enabled
		arrowstyle          = 1
#		border_shades       = { 1.0, 1.0} # draw a gradient on the border.
#		border_colors       = { "#E6DDD5", "#E6DDD5" } 
		colorize_scrollbar  = TRUE  # FALSE = disabled, TRUE = enabled
		comboboxstyle       = 0 # colorize the GtkComboBox below the arrow.
		contrast            = .85  # 0.8 for less contrast, more than 1.0 for more contrast on borders
#		focus_color         = @selected_bg_color
		glazestyle          = 5     # 0 = flat, 1 = curved, 2 = concave, 3 = top-curved, 4 = beryl
		glow_shade          = 1.20  # sets glow amount for buttons or widgets
		glowstyle           = 0     # 0 = top, 1 = bottom, 2 = top and bottom, 3 = center (vertical), 4 = center (horizontal) 
		gradient_shades     = { 1.13, 1.02, 1.00, 1.02 } # default: {1.1,1.0,1.0,1.1}
		highlight_shade     = 1.0   # set highlight amount for buttons or widgets
		lightborder_shade   = 1.2   # sets lightborder amount for buttons or widgets
		lightborderstyle    = 1     # 0 = lightborder on top side, 1 = lightborder on all sides
		listviewheaderstyle = 1     # 0 = flat, 1 = glassy, 2 = raised
		listviewstyle       = 0     # 0 = nothing, 1 = dotted
		menubaritemstyle    = 1     # 0 = menuitem look, 1 = button look
		menubarstyle        = 0     # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped
		menuitemstyle       = 1     # 0 = flat, 1 = glassy, 2 = striped
		menustyle           = 0     # 0 = no vertical menu stripe, 1 = display vertical menu stripe
		prelight_shade      = 1.25 #to select the shade level used in the scrollbar's slider, GtkComboBox with comboboxstyle = 1 and in the prelight state with gradient_colors.
 		progressbarstyle    = 0     # 0 = no stripes, 1 = diagonal stripes, 2 = vertical stripes 
		reliefstyle	    = 4     # 0 = flat, 1 = inset, 2 = shadow, = 3 for a gradient on shadow, = 4 for a stronger shadow.
		rgba		    = TRUE # FALSE = disabled, TRUE = enabled
		roundness           = 2     # 0 = squared, 1 = old default, more will increase roundness
		scrollbarstyle      = 0     # 0 = nothing, 1 = circles, 2 = handles, 3 = diagonal stripes, 4 = diagonal stripes and handles, 5 = horizontal stripes, 6 = horizontal stripes and handles
		shadow_shades 	    = { 0.8, 2.2 }
		sliderstyle         = 0     # 0 = nothing added, 1 = handles
		spinbuttonstyle     = 1
		stepperstyle        = 1     # 0 = standard, 1 = integrated stepper handles, 2 = squared steppers with a rounded slider
#		textstyle 	    = 1
		trough_shades 	    = {1.1,0.87}
		toolbarstyle	    = 2     # 0 = flat, 1 = glassy, 2 = gradient
	}
}

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

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

style "dark"
{
	bg[NORMAL] = @bg_color
	bg[SELECTED] = shade(0.9,@selected_bg_color)
	bg[PRELIGHT] = shade (0.5, @selected_bg_color)
	bg[ACTIVE] = shade (0.7, @selected_bg_color)
	bg[INSENSITIVE] = shade (0.7, @bg_color)
	
	
	fg[NORMAL] = shade (0.9, @bg_color)
	fg[PRELIGHT] = @selected_fg_color
	fg[SELECTED] = "#968972"
	fg[ACTIVE] = "#968972"
	fg[INSENSITIVE] = "#47443F"	
	
}

style "button" = "wider"
{	
	engine "murrine"
	{
		border_shades = { .8, .8} # draw a gradient on the border.
		border_colors = { @ bg_color, @bg_color } 
		contrast = 1.0
		lightborder_shade = 1.06
	}
}

style "entry" {
	xthickness = 3
	ythickness = 3

	bg[SELECTED] = mix (0.4, @selected_bg_color, @base_color)
	fg[SELECTED] = @text_color

	engine "murrine" 
	{
		focus_color = shade (0.65, @selected_bg_color)
	}
}


style "toolbar" 
{
	engine "murrine"
	{
		gradient_shades = {1.00,0.95,0.95,0.90}
		toolbarstyle = 1
	}
}

style "dark-toolbar" = "dark"
{	
	xthickness = 2
	ythickness = 2
  	bg[NORMAL] = "#2D2416"
	bg[PRELIGHT] =  shade (0.45, @bg_color)
	bg[SELECTED] =  shade (0.35, @bg_color)
	bg[ACTIVE] =  shade (0.35, @bg_color)

	engine "murrine"
	{
		border_shades = {1.2, 1.0} # draw a gradient on the border.
		border_colors = { "#2D2519", "#2D2519" }
		glowstyle = 0
		gradient_shades = {1.1,1.0,1.0,0.7} 
	    	highlight_shade = 1.0
	    	lightborder_shade = 1.0
	    	reliefstyle = 4     # 0 = flat, 1 = inset, 2 = shadow, = 3 for a gradient on shadow, = 4 for a stronger shadow.
	}
}

style "dark-toolbar-sep" = "dark-toolbar"
{
	xthickness = 2 
}

style "notebook" 
{
	bg[NORMAL] = shade (1.0615, @bg_color)	
	bg[ACTIVE] = shade (0.85, @bg_color)		

  	engine "murrine" 
  	{
    		lightborder_shade = 1.1
   		highlight_shade	= 1.01
  	}
}

style "panel" 
{
  	bg_pixmap[NORMAL] = "panel-bg-dark.png"        	# Tint top/bottom panel background
  	bg[NORMAL] = "#2D2519"                          # Default top/bottom panel background 
  	bg[PRELIGHT] = shade(1.0, @theme_color_27)      # panel prelight
  	bg[ACTIVE] = @theme_color_27                    # bottom panel active background
  	bg[SELECTED] = @selected_bg_color               # Active window desktop lower panel background 
  	bg[INSENSITIVE] = shade(0.90, @theme_color_27)  #

  	fg[NORMAL] = @selected_fg_color                 # Default text
  	fg[PRELIGHT] = @selected_fg_color               # Prelight
  	fg[ACTIVE] = @selected_fg_color                 # Bottom panel active text
  	fg[SELECTED]  = @fg_color                       # Bottom panel selected window

	engine "murrine"
	{
		border_shades = {1.2, 1.0} 		# draw a gradient on the border.
		border_colors = { "#2D2416", "#2D2416" }
	}
}

style "murrine-PanelGtkMenubar" 
{
	bg[NORMAL] = "#2D2519"                    		# top desktop panel menu background color
	bg[SELECTED] = darker(@theme_color_04)    		# selected item background
	fg[NORMAL] = @bg_color    		  		# default panel text !
	fg[PRELIGHT] = @base_color               	 	# text after dropdown menu

  	font_name = "Bold"

  	engine "murrine"
  	{
    		contrast = 0.75
    		glazestyle = 3  # 0 = flat highlight, 1 = curved highlight, 2 = concave style, 3 = top curved highlight, 4 = beryl highlight
    		glow_shade = 1.5 # Data type: Real; default = 1.0, Range 0-2, precision 0.1
		glowstyle = 0 # 0 = Top glow, 1 = Bottom glow, 2 = Top and Bottom glow, 3 = Horizontal glow, 4 = Centered glow
    		roundness = 2
  	}
}

widget "*clock-applet-button*" style "dark-toolbar"

style "menu" = "dark"
{
	xthickness = 0
	ythickness = 0

	#Keep it this dark since OOo likes it
	bg[NORMAL] = "#2D2519"
	text[NORMAL] = @bg_color
	text[PRELIGHT]	= @selected_fg_color
}

style "menu-item" = "dark"
{
	xthickness = 0
	ythickness = 3
	engine "murrine"
	{
		border_shades = { 1.1, 1.1} # draw a gradient on the border.
		border_colors = { @selected_bg_color, @selected_bg_color } 
		glowstyle = 0
	    	gradient_shades = {1.1,1.0,1.0,0.7}
	    	highlight_shade = 1.0
	    	lightborder_shade   = 1.0
	    	
	}
}

style "separator-menu-item"
{
	GtkSeparatorMenuItem::horizontal-padding = 2
	GtkWidget::wide-separators = 1
	GtkWidget::separator-width = 1
	GtkWidget::separator-height = 2
	xthickness = 4
	ythickness = 0
	bg[NORMAL] = "#2D2519"
}

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

   	bg[NORMAL] = shade(0.9, @bg_color)
    	bg[PRELIGHT] = shade(1.0, @bg_color)
    	bg[ACTIVE] = shade(0.8, @bg_color)
}	

style "tooltips" 
{
	xthickness = 8
 	ythickness = 4
 
	GtkWidget::new-tooltip-style = 1

 	bg[NORMAL] = @tooltip_bg_color
 	fg[NORMAL] = @tooltip_fg_color
}

style "progressbar"
{
	xthickness = 0
	ythickness = 0

	fg[PRELIGHT] = @selected_fg_color

}

style "statusbar"
{
	ythickness = 3
	xthickness = 3

    engine "pixmap"
    {
        image
        {
        	function 		= RESIZE_GRIP
        	recolorable 		= TRUE
       		detail 			= "statusbar"
       		overlay_file 		= "statusgrip.png"
      		overlay_border 		= {0,0,0,0}
      		overlay_stretch 	= TRUE
        }
        image
	{
	   	function		= SHADOW
	   	shadow			= IN
	   	file			= "blank.png"
	}
	image
	{
	  	function		= SHADOW
	   	shadow			= OUT
	   	file			= "blank.png"
	}
	image
	{
	   	function		= SHADOW
	   	shadow			= ETCHED_IN
	   	file			= "blank.png"	
	}
	image
	{
	   	function		= SHADOW
	   	shadow			= ETCHED_OUT
	   	file			= "blank.png"
	}
    }
}

style "comboboxentry" 
{
}

style "scrollbar"
{
	engine "murrine"
	{
		border_shades = { .7, .7} # draw a gradient on the border.
		border_colors = { @bg_color, @bg_color } 
		glazestyle = 4     # 0 = flat, 1 = curved, 2 = concave, 3 = top-curved, 4 = beryl
		glow_shade = 1.1   # sets glow amount for buttons or widgets
		glowstyle = 4     # 0 = top, 1 = bottom, 2 = top and bottom, 3 = center (vertical), 4 = center (horizontal) 
		gradient_shades = {1.02,1.01,0.96,0.95} # default: {1.1,1.0,1.0,1.1}
		highlight_shade = 1.05   # set highlight amount for buttons or widgets
		lightborder_shade = 1.3   # sets lightborder amount for buttons or widgets
		roundness = 4
	}

	bg[SELECTED] = mix(0.2, @bg_color, @selected_bg_color)
}

style "spinbutton"
{
}

style "scale"
{
	bg[PRELIGHT] = shade(0.9,@bg_color)
	
	engine "murrine"
	{
	    	roundness = 2
	    	contrast = 1.1
	   	 highlight_shade = 1.2
	    	lightborder_shade   = 1.1
	    	gradient_shades = {1.0,0.85,0.8,1.0}
	    	reliefstyle = 2
	}
}

style "menubar" = "dark-toolbar"
{
	# Static dark color so continuity doesn't break with toolbars
	# when color changes
	ythickness = 0
	xthickness = 0
	
	fg[NORMAL] = @selected_fg_color                 # Menubar text
  	text[NORMAL] = @selected_fg_color               # Menubar text (OOo)

	engine "murrine"
	{
		border_shades = { .6, .6} 		# draw a gradient on the border.
		border_colors = { "#2D2416", "#2D2416" } 
	}
	
}

style "frame"
{
}

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

# SZ07: This is added to tell the theme how to color checkmarks and radio items that are not in menus.
style "radiocheck"
{
	text[NORMAL]	= @selected_fg_color	# Color for selected checks/radio items.
	text[PRELIGHT]	= @selected_fg_color	# Color for selected checks/radio items on prelight.
	
	engine "murrine"
	{
	    	roundness = 2
	    	contrast = 1.03
	    	highlight_shade = 1.0
	    	lightborder_shade = 1.0
	    	gradient_shades = {1.1,1.0,1.0,0.9}
	    	reliefstyle	= 3 
	}
}

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

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

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

# Increase the x/ythickness in some widgets
class "GtkRange"     style "default"
class "GtkFrame"     style "frame"
class "GtkSeparator" style "wide"
class "GtkEntry"     style "entry"
class "GtkStatusbar" style "statusbar"
class "GtkMenuBar"   style:highest "menubar"
class "GtkRadioButton"	style:highest "radiocheck"	# SZ07: Added for the checkmarks/radio
class "GtkCheckButton"	style:highest "radiocheck"	# SZ07: Added for the checkmarks/radio

# Toolbar default: light
class "*HandleBox" style "toolbar"
class "GtkToolbar"   style "toolbar" 
widget_class "*HandleBox" style "toolbar"
widget_class "*<GtkToolbar>.*"   style "toolbar"

#
# Toolbar exceptions:
# Browser-type and viewer-type applications get a dark toolbar.
# Everything below the toolbar for these apps are the content. This will make
# a separation on function (toolbar) and content (client area)

# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
style "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 "text-is-fg-color-workaround"

style "text-is-fg-color-workaround-dark"
{
	#Make it work with this theme!
	text[NORMAL] = @bg_color
	text[PRELIGHT] = mix (1.0, @bg_color, '#ffffff')
}

###################################################
# Nautilus
###################################################

style "nautilus-sidebar" {
	
	bg[PRELIGHT] = mix(0.30, @bg_color, shade (1.27, @selected_bg_color))

	font_name = "Regular"

        GtkTreeView::even_row_color = @bg_color
  	
	# Make the sep line fade out
  	engine "pixmap"
  	{
      	image
      	{
      		function		= HLINE
     		recolorable		= TRUE
      		file			= "Lines/line-h-faded.png"
      		stretch			= TRUE
     	}
      
      # Make the handle be a vert line in order to better separate nautilus files view
      ## vertical handle
    	image
    	{
    	  	function		= HANDLE
    	  	recolorable		= TRUE
    	  	state          		= NORMAL
       	  	overlay_file		= "Others/null.png"
     	  	overlay_stretch		= FALSE
      	  	orientation		= VERTICAL
    	}
    	image
    	{
    	  	function		= HANDLE
    	  	recolorable		= TRUE
    	  	state          		= PRELIGHT
       	  	overlay_file		= "Others/null.png"
     	  	overlay_stretch		= FALSE
      	  	orientation		= VERTICAL
    	}
    	image
    	{
    	  	function		= HANDLE
    	  	recolorable		= TRUE
    	  	state          		= ACTIVE
       	  	overlay_file		= "Panel/handle-v-pressed.png"
     	  	overlay_stretch		= FALSE
      	  	orientation		= VERTICAL
    	}
    	image
    	{
    	  	function		= HANDLE
    	  	recolorable		= TRUE
    	  	state          		= INSENSITIVE
       	  	overlay_file		= "Panel/handle-v-insens.png"
     	  	overlay_stretch		= FALSE
      	  	orientation		= VERTICAL
    	}
      
 }
}

style "nautilus-view" = "default"
{
	#xthickness = 8	
}

style "nautilus-sidebar-title"
{
	fg[NORMAL] = mix(0.50, shade (0.63,@bg_color), shade (0.63, @selected_bg_color))
	fg[PRELIGHT] = shade (0.65, @selected_bg_color)
	bg[PRELIGHT] = mix(0.30, @bg_color, shade (1.27, @selected_bg_color))
	
	stock["gtk-close"] = {{ "Others/null.png", *, *, * }} # Get rid of the close icon

	font_name = "semibold"

	GtkExpander::expander_spacing = 0
  	GtkArrow::arrow-scaling = 0.6 # allowed: 0.1 ~ 1.0 (0.6 is an approximation to get 9 by 9 pixels arrow)
  	GtkButton::image-spacing = 0
  	GtkButton::inner-border = {0, 0, 4, 0}
	GtkButton::child-displacement-x = 0
	GtkButton::child-displacement-y = 0
	GtkButton::default-border = { 0, 0, 0, 0 }
	
      	xthickness = 2
      	ythickness = 0	
	
	engine "pixmap"
	{
		image
		{
		    	function 	= SHADOW
		}
		image
		{
		    	function 	= BUTTON
		    	file 		= "Others/null.png" # 1x1 pixel empty, transparent
		}
            image
		{
		    	function	= ARROW
           		arrow_direction = DOWN
         		border 		= {0,0,0,0}
          		stretch 	= TRUE
          		recolorable 	= TRUE
		   	file 		= "Others/arrow-d.png" # this should be 9x9 pixels, arrow down
		}
	}
}

style "nautilus-handle"
{
  	engine "pixmap"
  	{
        image
    	{
    	  	function		= HANDLE
    	  	recolorable		= TRUE
    	  	state          		= NORMAL
       	  	overlay_file		= "Others/null.png"
     	  	overlay_stretch		= FALSE
      	  	orientation		= VERTICAL
    	}
    	image
    	{
    	  	function		= HANDLE
    	  	recolorable		= TRUE
    	  	state          		= PRELIGHT
       	  	overlay_file		= "Others/null.png"
     	  	overlay_stretch		= FALSE
      	  	orientation		= VERTICAL
    	}
    	image
    	{
    	  	function		= HANDLE
    	  	recolorable		= TRUE
    	  	state         		= ACTIVE
       	  	overlay_file		= "Panel/handle-v-pressed.png"
     	  	overlay_stretch		= FALSE
      	  	orientation		= VERTICAL
    	}
    	image
    	{
    	  	function		= HANDLE
    	  	recolorable		= TRUE
    	  	state         		= INSENSITIVE
       	  	overlay_file		= "Panel/handle-v-insens.png"
     	  	overlay_stretch		= FALSE
      	  	orientation		= VERTICAL
    	}
      
    }
}

widget_class "*Nautilus*View*" 			style "nautilus-view"
widget_class "*NautilusSidePane.*"           	style "nautilus-sidebar-title"
widget_class "*Nautilus*Places*Sidebar*"    	style "nautilus-sidebar"
widget_class "*Nautilus*Side*.GtkWidget"    	style "nautilus-sidebar"
widget_class "*Nautilus*Side*Title*"        	style "nautilus-sidebar-title"
widget_class "*Nautilus*Toolbar*" 		style "dark-toolbar"
widget_class "*Nautilus*Tool*GtkButton" 	style "dark-toolbar"
widget_class "*Nautilus*Tool*.*.*" 		style "dark-toolbar"
widget_class "*Nautilus*Tool*GtkToggleButton" 	style "dark-toolbar"
widget_class "*Nautilus*Tool*Separator*" 	style "dark-toolbar-sep"
widget_class "*Nautilus*Tool*.<GtkComboBox>.<GtkCellView>" style "text-is-fg-color-workaround-dark"

# Evince/EOG
widget_class "*EggEditable*Toolbar*" style "dark-toolbar"
widget_class "*EggEditable*Toolbar*.*.*.*" style "dark-toolbar"
widget_class "*EggEditable*Tool*.<GtkComboBox>.<GtkCellView>"   style "text-is-fg-color-workaround-dark"

widget "*fullscreen-toolbar" style "dark-toolbar"
widget "*fullscreen-toolbar.*" style "dark-toolbar"
widget "*fullscreen-toolbar*.GtkComboBox.GtkCellView"   style "text-is-fg-color-workaround-dark"

# Epiphany
widget_class "*EphyToolbar*" style "dark-toolbar"
widget_class "*EphyToolbar*.*.*.*" style "dark-toolbar"
widget_class "*EphyTool*.<GtkComboBox>.<GtkCellView>"   style "text-is-fg-color-workaround-dark"
 
# Brasero
widget_class "*Brasero*Toolbar*"   style "dark-toolbar" 
widget_class "*Brasero*Toolbar*.*"   style "dark-toolbar" 
widget_class "*Brasero*Toolbar*.<GtkComboBox>.<GtkCellView>"   style "text-is-fg-color-workaround-dark"

#gThumb
widget_class "*Gth*Toolbar*"   style "dark-toolbar" 
widget_class "*Gth*Toolbar*.*"   style "dark-toolbar" 
widget_class "*Gth*Toolbar*.<GtkComboBox>.<GtkCellView>"   style "text-is-fg-color-workaround-dark"
widget_class "*GthFull*"   style "dark-toolbar" #Doesn't work

#Totem
widget "*totem*" style "dark-toolbar"
style "totem-sidebar-workaround" 
{
	text[NORMAL] = @bg_color
	text[PRELIGHT] = mix (0.8, '#ffffef', @bg_color)
}
widget "*tmw_main_pane.EvSidebar.*GtkComboBox.*"	style "totem-sidebar-workaround"

class "GtkSpinButton"  style "spinbutton"
class "GtkScale"       style "scale"
class "GtkVScale"      style "scale"
class "GtkHScale"      style "scale"
class "GtkScrollbar"   style "scrollbar"
class "GtkButton"      style "button"

# 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 "*<GtkNotebook>*<GtkEventBox>"     style "notebook"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"  style "notebook"
widget_class "*<GtkNotebook>*<GtkLayout>"       style "notebook"
widget_class "*<GtkNotebook>"    		style "notebook"

widget_class "*<GtkComboBoxEntry>*" 		style "comboboxentry"
widget_class "*<GtkCombo>*"         		style "comboboxentry"

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

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

widget_class "*<GtkStatusbar>*"  		style "wider"
widget_class "*<GtkProgressBar>"       		style "progressbar"

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

#Panel
widget "*PanelWidget*" 				style "panel"
widget "*PanelApplet*" 				style "panel"
widget "*fast-user-switch*" 			style "panel" # Workaround for Fast User Switch applet
class "PanelApp*" 				style "panel"
class "PanelToplevel*" 				style "panel"

# The panel menubar
widget_class "*Panel*<GtkMenuBar>*" 		style:highest "murrine-PanelGtkMenubar"

#XFCE panel
widget_class "*notif*"				style "panel"
widget_class "*Notif*"				style "panel"
widget_class "*Tray*"				style "panel"
widget_class "*tray*"				style "panel"
widget "*Xfce*Panel*"				style "panel"
class "*Xfce*Panel*"				style "panel"

# The window of the tooltip is called "gtk-tooltip"
################################
# FIXME:
# This will not work if one embeds eg. a button into the tooltip.
# As far as I can tell right now we will need to rework the theme
# quite a bit to get this working correctly.
# (It will involve setting different priorities, etc.)
################################
widget "gtk-tooltip" 			style "tooltips"

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

# Nautilus sidebar
widget_class "*NautilusSidePane.GtkFrame"	style "statusbar"

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

# Monodevelop uses an OptionPanel widget, which incidentally is dark in our theme.
# Undo it:
widget "*OptionPanel*"		style "button"
widget "*optionPanel*"		style "button"

# 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 "nautilus-location"

style "menuitem-text-is-fg-color-workaround" 
{
}
widget "*.gtk-combobox-popup-menu.*"   style "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 "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 "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 "fg-is-text-color-workaround"

style "evo-new-button-workaround" 
{
	engine "murrine"
	{
		toolbarstyle = 0
	}
}

widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "evo-new-button-workaround"

#Rhythmbox toolbar near the search entry. Use default + wide so that it doesn't turn dark.
style "rhythmbox-header" = "default"
{
	xthickness = 3
	ythickness = 3
	engine "murrine" {
	}
}
widget "*RBSourceHeader*"	style:highest "rhythmbox-header"
widget "*HeaderToolbar*"	style:highest "rhythmbox-header"
widget "*FooterToolbar*"	style:highest "rhythmbox-header"

widget "*swt*toolbar*"	style "default"

# RSC: Fix for CPU frequency applet
style "applet-text" = "panel"
{
	fg[NORMAL] = @bg_color
}

widget_class "*CPUFreqApplet*" style:highest "applet-text"

style "dialog" = "dark"
{
    bg[NORMAL] = mix(0.4, @selected_bg_color, shade(0.7, @bg_color))
    fg[NORMAL] = shade(0.5, @fg_color)
    text[NORMAL] = shade(0.5, @text_color)
}
style "dialog-button" = "dark"
{
    bg[NORMAL] = shade(0.15, @bg_color)
    bg[PRELIGHT] = shade(0.18, @bg_color)
}
