# Please keep this gtkrc in sync with the other ones from murrine-themes themes.
# Ubuntu Hanso theme
# by James Schriver <jws141@gmail.com>
# inspired by Rico Sta. Cruz and Ricardo (Kido) Mariano III Dust Theme

gtk_color_scheme = "fg_color:#413829\nbg_color:#FAF4E3\nbase_color:#fff\ntext_color:#261200\nselected_bg_color:#996149\nselected_fg_color:#fff\ntooltip_bg_color:#ebeab8\ntooltip_fg_color:#261200"

gtk-icon-sizes = "panel-menu=24,24:gtk-button=16,16"

style "default"
{
	########
	# Style Properties
	########
	xthickness = 1
	ythickness = 1

	GtkButton::child-displacement-x = 0
	GtkButton::child-displacement-y = 1

	GtkButton::default-border = { 0, 0, 0, 0 }
	GtkCheckButton::indicator-size = 14
	GtkRadioButton::indicator-size = 14
	GtkPaned::handle-size = 6

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

	GtkScale::slider-length = 24
	GtkScale::trough-side-details = 1
	GtkScrollbar::min-slider-length = 35

	GtkMenuBar::internal-padding = 0
	GtkExpander::expander-size = 16
	GtkToolbar::internal-padding = 1
	GtkTreeView::expander-size = 14
	GtkTreeView::vertical-separator = 0
	GtkTreeView::odd_row_color = mix (0.98, shade (0.93, @base_color), @selected_bg_color)

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

	# GtkWidget::focus-padding = 0
  	GtkScrolledWindow::scrollbar-spacing = 1
	
	# GtkToolbar::shadow-type = GTK_SHADOW_NONE
	#GtkMenuBar::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[ACTIVE]        = @fg_color
	fg[SELECTED]      = @selected_fg_color
	fg[INSENSITIVE]   = shade (0.65, @bg_color)

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

	base[NORMAL]      = @base_color
	base[PRELIGHT]    = shade (0.95, @bg_color)
	base[ACTIVE]      = shade (1.0, @selected_bg_color)
	base[SELECTED]    = shade (1.05, @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] = shade (0.65, @bg_color)

	engine "murrine" 
	{
		animation           = TRUE  # FALSE = disabled, TRUE = enabled
		colorize_scrollbar  = TRUE  # FALSE = disabled, TRUE = enabled
		contrast            = 1.01  # 0.8 for less contrast, more than 1.0 for more contrast on borders
		#focus_color         = @selected_bg_color
		glazestyle          = 0     # 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.03,1.02,1.01,0.94} # default: {1.1,1.0,1.0,1.1}
		gradients           = TRUE  # FALSE = disabled, TRUE = enabled
		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        = 2     # 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
		progressbarstyle    = 0     # 0 = no stripes, 1 = diagonal stripes, 2 = vertical stripes 
		reliefstyle	    = 2     # 0 = flat, 1 = inset, 2 = shadow
		rgba		    = FALSE # 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
		#scrollbar_color    = shade (1.03, @bg_color)
		sliderstyle         = 0     # 0 = nothing added, 1 = handles
		stepperstyle        = 1     # 0 = standard, 1 = integrated stepper handles, 2 = unknown
		#profile            = NODOKA # engine profile options: CANDIDO, CLEARLOOKS, MIST, MURRINE, NODOKA
		toolbarstyle	    = 2     # 0 = flat, 1 = glassy, 2 = gradient
	}
}

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

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

style "entry" {
	xthickness = 3
	ythickness = 3

	bg[SELECTED] = shade (0.5, @selected_bg_color)
	fg[SELECTED] = @text_color

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

style "dark"
{
	bg[NORMAL]	  = "#382B22"
	bg[PRELIGHT]      = shade(0.6, @selected_bg_color)
	bg[ACTIVE]        = shade(0.75, @fg_color)
	bg[SELECTED]	  = shade(.8, @fg_color)
	bg[INSENSITIVE]   = @fg_color
	
	fg[NORMAL]        = mix (0.5, @bg_color, shade (2.0, @fg_color))
	fg[PRELIGHT]      = @bg_color
	fg[ACTIVE]        = shade (0.6, @bg_color)
	fg[SELECTED]      = @selected_bg_color
	#fg[INSENSITIVE]   = shade(0.6, @bg_color)
	fg[INSENSITIVE]   = "#827558"	
}

style "button" {
	xthickness = 3
	ythickness = 3

	bg[NORMAL]        = shade (.9, @bg_color)
	bg[PRELIGHT]      = shade (.85, @bg_color)
	bg[ACTIVE]        = shade (.8, @bg_color)
	
	engine "murrine" {
		contrast            = .98
		}
}

style "menu_item" 
{
	xthickness = 2
	ythickness = 3
	
	bg[PRELIGHT]      = shade (.6, @selected_bg_color)
	bg[SELECTED]      = shade (.6, @selected_bg_color)
	bg[ACTIVE]        = shade (.6, @selected_bg_color)

        fg[NORMAL]        = mix (0.5, @bg_color, shade (2.0, @fg_color))
        fg[PRELIGHT]      = @bg_color
	fg[ACTIVE]        = shade (0.6, @bg_color)
	fg[SELECTED]      = @selected_bg_color
	fg[INSENSITIVE]   = shade(0.5, @bg_color)	


        engine "murrine"
	{
		highlight_shade     = 1.03
		roundness	    = 3	
	}
}

style "toolbar" = "default" 
{
    engine "murrine" 
    {
        contrast = 0.0
		gradient_shades = {0.94,0.93,0.95,1.0} # default: {1.1,1.0,1.0,1.1}
	}
}

style "toolbar-sep" = "toolbar-item"
{
        xthickness = 1
}

style "dark-toolbar" = "dark"
{	
    	xthickness = 2
	ythickness = 2
    	
	engine "murrine"
	{
                highlight_shade     = 1.03
		roundness	    = 3	
	}
}

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

style "pixmap-dark-toolbar" = "dark-toolbar"
{
	# To-do: make the toolbar recolorable, possibly without using pixmaps
	# We only like this because of the top line, anyway.
	engine "pixmap"{
		image {
	  		function = BOX
	  		file = "toolbar_o.png"
	  		border = {1,1,1,1}
	  	}
	  	image
		{
		      function				= HANDLE
		      overlay_file			= "handlebox.png"
		      overlay_stretch 	= FALSE
		      orientation			= HORIZONTAL
    		}
    		image
		{
		      function				= HANDLE
		      overlay_file			= "handlebox.png"
		      overlay_stretch 	= FALSE
		      orientation			= VERTICAL
    		}
    	}
}

style "notebook_bg" {
	bg[NORMAL]     = shade (.98, @bg_color)
        bg[ACTIVE]     = shade (.96, @bg_color)
	bg[SELECTED]   = shade (1.0, @bg_color)
}

# The color is changed by the notebook_bg style, this style
# changes the x/ythickness
style "notebook" {
	xthickness = 2
	ythickness = 2

        bg[NORMAL]   = shade (.98, @bg_color)

	engine "murrine" 
	{
		gradient_shades = { .8, .95, .95, 1.0 }
	}
}

style "panel" = "dark" 
{
	bg[NORMAL]= shade (0.85, "#2C2416")
	#bg_pixmap[NORMAL] = "panel_bg.png"
	
}

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

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

style "separator_menu_item" {
	xthickness = 1
	ythickness = 0

	GtkSeparatorMenuItem::horizontal-padding = 0
	GtkWidget::wide-separators = 1
	GtkWidget::separator-width = 1
	GtkWidget::separator-height = 7
}

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

        bg[NORMAL] = shade(0.9, @bg_color)
        bg[PRELIGHT] = shade(1.0, @bg_color)
        bg[ACTIVE] = shade(0.8, @bg_color)
    
        GtkWidget::focus-line-width = 0
}

style "tooltips"
{
	xthickness = 4
	ythickness = 4

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

# The almost useless progress bar style
style "progressbar" = "wide" {
	
	engine "murrine" {
		glowstyle = 3
		roundness = 1
	}
}

style "progressbar_menu_item" = "progressbar" {
	engine "murrine" {
		roundness = 0
		lightborder_shade = 1.1
	}
}

style "pixmap-statusbar" = "default"
{
	ythickness = 3
	xthickness = 3

    engine "pixmap"
    {
        image
        {
            function = RESIZE_GRIP
            recolorable = TRUE
            detail = "statusbar"
            overlay_file = "Handles/resize-grip.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 "spinbutton"
{
}

style "scale" {
	GtkRange       ::slider-width = 13

        bg[SELECTED] = shade (1.4, @selected_bg_color)
	fg[PRELIGHT] = @base_color

	engine "murrine" 
	{
		highlight_shade = 1.02
		#style = MODERN
		roundness = 2
	}
}

style "scrollbar"
{
	engine "murrine" {
		roundness = 2
		gradient_shades = {1.08,0.97,0.95,0.8}
	}

}

style "hscrollbar" {
}

style "vscrollbar" {
}

style "menubar" = "dark"
{
	bg[NORMAL] = "#2C2416"      
}
		
style "frame"
{
}

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

##Workaround for dotted vertical lines X-Chat users widget##
style "treeview" {

	engine "clearlooks" {
		hint = "treeview"
	}
}

style "calendar" {
	engine "murrine" 
	{
		roundness = 0
	}
}

style "radiocheck" = "default"
{
	bg[SELECTED] = shade (1.2, @selected_bg_color)
	fg[PRELIGHT] = @base_color
	text[NORMAL] = @selected_fg_color
	text[PRELIGHT] = @selected_fg_color

        engine "murrine" 
        {
		roundness = 2
	}
}

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

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

# murrine default style is applied to every widget
class "GtkWidget"    style "default"
class "GtkRadio*" style "radiocheck"
class "GtkCheck*" style "radiocheck"

# 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 "pixmap-statusbar"
class "GtkMenuBar"   style:highest "menubar"

# 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] = mix (1.5, @fg_color, '#ffffff')
	text[PRELIGHT] = mix (1.4, @fg_color, '#ffffff')
}

#  Nautilus toolbar: dark
widget_class "*Nautilus*Toolbar*" style "pixmap-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: dark
widget_class "*EggEditable*Toolbar*" style "pixmap-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 "pixmap-dark-toolbar"
widget "*fullscreen-toolbar.*" style "dark-toolbar"
widget "*fullscreen-toolbar*.GtkComboBox.GtkCellView"   style "text-is-fg-color-workaround-dark"

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

# F-Spot(?): dark
widget_class "*Spot*Toolbar*" style "pixmap-dark-toolbar"
widget_class "*Spot*Toolbar*.*.*.*" style "dark-toolbar"
widget_class "*Spot*Toolbar*.<GtkComboBox>.<GtkCellView>"   style "text-is-fg-color-workaround-dark"
 
# Gedit: Dark
widget_class "*edit*Toolbar*"   style "pixmap-dark-toolbar" 
widget_class "*edit*Toolbar*.*"   style "dark-toolbar" 
widget_class "*edit*Tool*Separator*" style "dark-toolbar-sep"
widget_class "*edit*Toolbar*.<GtkComboBox>.<GtkCellView>"   style "text-is-fg-color-workaround-dark"

# Brasero: Dark
widget_class "*rasero*Toolbar*"   style "pixmap-dark-toolbar" 
widget_class "*rasero*Toolbar*.*"   style "dark-toolbar" 
widget_class "*rasero*Toolbar*.<GtkComboBox>.<GtkCellView>"   style "text-is-fg-color-workaround-dark"

#gThumb: dark
widget_class "*Gth*Toolbar*"   style "pixmap-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 "pixmap-dark-toolbar" #Doesn't work

#Totem
#widget "*totem*" style "dark"

class "GtkSpinButton"  style "spinbutton"
class "GtkScale"       style "scale"
class "GtkVScale"      style "scale"
class "GtkHScale"      style "scale"
class "GtkScrollbar"   style "scrollbar"
class "GtkHScrollbar" style "hscrollbar"
class "GtkVScrollbar" style "vscrollbar"
class "GtkButton"      style "button"
class "GtkCalendar" style "calendar"

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

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

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 "*.<GtkTreeView>*" style "treeview"

widget_class "*<GtkStatusbar>*"  style "wider"
widget_class "*<GtkProgressBar>"       style "progressbar"
widget_class "*.<GtkMenuItem>.*.<GtkProgressBar>" style "progressbar_menu_item"

# 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 stuff
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"
widget_class "*Panel*<GtkMenuBar>*"           		style:highest "panel" # The panel menubar
widget "*TomboyTray*"					style "panel" # Workaround for Tomboy
widget "*TomboyApplet*"					style "panel"

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

# XFCE panel theming.
widget "*Xfce*Panel*" style "panel"
class "*Xfce*Panel*" style "panel"

style "bold-panel-item" {
	font_name = "Bold"

	engine "murrine"
	{
		roundness = 2
	}
}

widget "*Panel*MenuBar*" style "bold-panel-item"
widget "*gimmie*" style "bold-panel-item"
widget "*clock-applet-button*" style "bold-panel-item"

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

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

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

# Firefox isn't nice to dark themes, so unset the dark stuff.
#widget "MozillaGtkWidget*Toolbar*"	style "toolbar-item"
#widget "MozillaGtkWidget*Frame*"	style "default"

# 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" 
{
	#text[NORMAL]        = @fg_color
	#text[PRELIGHT]      = @selected_fg_color
	#text[SELECTED]      = @selected_fg_color
	#text[ACTIVE]        = @fg_color
	#text[INSENSITIVE]   = darker (@bg_color)
	#Make it work with this theme!
	text[NORMAL] = mix (1.5, @fg_color, '#ffffff')
	text[PRELIGHT] = mix (1.4, @fg_color, '#ffffff')
}
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 "*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)
}
