# Dichotomy GTK Theme
#
# Authors:
# Conn O'Griofa <connogriofa@gmail.com>
#
# Feel free to modify and share!

gtk_color_scheme = "fg_color:#101010\nbg_color:#E0D6BA\nbase_color:#FFF\ntext_color:#1A1A1A\nselected_bg_color:#F1772C\nselected_fg_color:#FFF\ntooltip_bg_color:#300a24\ntooltip_fg_color:#FFF"

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

style "murrine-default"
{
	GtkButton      ::child-displacement-x = 1
	GtkButton      ::child-displacement-y = 1
	GtkButton      ::default-border       = { 0, 0, 0, 0 }
	GtkButton      ::displace-focus       = 0
	GtkButton      ::image-spacing        = 2

	GtkCheckButton ::indicator-size       = 14
	GtkCheckButton ::indicator-spacing    = 0

	GtkComboBox ::appears-as-list       = 0

	GtkEntry::honors-transparent-bg-hint = 1
	GtkEntry::state-hint = 0

	GtkExpander    ::expander-size        = 14
	GtkExpander    ::expander-spacing     = 2

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

	GtkMenuBar     ::internal-padding     = 0
	#GtkMenuBar     ::shadow_type          = GTK_SHADOW_NONE #???
	GtkMenuBar     ::window-dragging      = 1

	GtkNotebook    ::tab-curvature      = 0
	GtkNotebook    ::tab-overlap      = -1

	GtkPaned       ::handle-size          = 6

	GtkProgressBar       ::xspacing       = 0
	GtkProgressBar       ::yspacing       = 0

	GtkRange       ::activate-slider      = 0
	GtkRange       ::slider-width         = 14
	GtkRange       ::stepper-size         = 14
	GtkRange       ::stepper-spacing      = 0
	GtkRange       ::trough-border        = 2
        GtkRange       ::trough-under-steppers = 1

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

	GtkScrollbar   ::min-slider-length    = 30

	GtkScrolledWindow ::scrollbar-spacing = 3
	GtkScrolledWindow ::scrollbar-within-bevel = 1

	#GtkStatusbar ::shadow-type = GTK_SHADOW_ETCHED_IN

	GtkToolbar     ::internal-padding     = 1

	#GtkTreeView    ::even-row-color      = ###
	GtkTreeView    ::expander-size        = 14
	#GtkTreeView    ::grid-line-pattern    = ###
	GtkTreeView    ::grid-line-width    = 0
	GtkTreeView    ::horizontal-separator   = 0
	GtkTreeView    ::indent-expanders     = TRUE
	#GtkTreeView    ::odd-row-color      = ###
	GtkTreeView    ::row-ending-details    = 0
	#GtkTreeView    ::tree-line-pattern    = ###
	GtkTreeView    ::tree-line-width    = 0
	GtkTreeView    ::vertical-separator   = 0

	GtkWidget      ::new-tooltip-style    = 1
	#GtkWidget      ::focus-line-pattern    = "\001\001" #???
	GtkWidget      ::focus-line-width    = 1
	GtkWidget      ::focus-padding = 0
	GtkWidget      ::interior-focus = 1
	#GtkWidget      ::link-color           = @fg_color
	GtkWidget      ::separator-height = 0
	GtkWidget      ::separator-width = 0
	#GtkWidget      ::visited-link-color   = shade (0.2, @fg_color)
	GtkWidget      ::wide-separators = 1

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

	xthickness = 1
	ythickness = 1

	fg[NORMAL]        = @fg_color
	fg[PRELIGHT]      = @fg_color
	fg[ACTIVE]        = @fg_color
	fg[SELECTED]      = @selected_fg_color
	fg[INSENSITIVE]   = shade (0.55, @bg_color)

	bg[NORMAL]        = @bg_color
	bg[PRELIGHT]      = mix (0.9, @bg_color, shade (3.5, @tooltip_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]      = mix (0.3, @bg_color, @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] = shade (0.55, @bg_color)

	engine "murrine" 
	{
		animation           = TRUE  # FALSE = disabled, TRUE = enabled
		arrowstyle          = 1     # 0 = normal arrows, 1 = filled arrows
		#border_colors      = { "#ffffff", "#ffffff" } # colors used on borders of many widgets
		border_shades       = { 1.2, 1.0 } # gradient to draw on border
		#gradient_colors    = { "#ffffff", "#ffffff", "#ffffff", "#ffffff" } # colors used on gradient of many widgets
		comboboxstyle       = 1     # 0 = normal combobox, 1 = colorized combobox below arrow
		colorize_scrollbar  = TRUE  # FALSE = disabled, TRUE = enabled
		contrast            = 0.8   # 0.8 for less contrast, more than 1.0 for more contrast on borders
		focus_color         = mix (0.7, @bg_color, shade (3.5, @tooltip_bg_color))
		glazestyle          = 0     # 0 = flat, 1 = curved, 2 = concave, 3 = top-curved, 4 = beryl
		glow_shade          = 1.05   # 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.03,1.01,1.01,0.95} # default: {1.1,1.0,1.0,1.1}
		highlight_shade     = 1.02  # set highlight amount for buttons or widgets
		lightborder_shade   = 1.2   # sets lightborder amount for buttons or widgets
		lightborderstyle    = 0     # 0 = lightborder on top side, 1 = lightborder on all sides
		listviewheaderstyle = 1     # 0 = flat, 1 = glassy, 2 = raised
		listviewstyle       = 1     # 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      = 0.95  # shade level for scrollbar's slider, comboboxstyle(1), and prelight state with gradient_colors
		progressbarstyle    = 0     # 0 = no stripes, 1 = diagonal stripes, 2 = vertical stripes 
		reliefstyle	    = 3     # 0 = flat, 1 = inset, 2 = shadow, 3 = shadow with gradient, 4 = stronger shadow with gradient
		rgba		    = FALSE # FALSE = disabled, TRUE = enabled
		roundness           = 2     # 0 = squared, 1 = old default, more will increase roundness
		scrollbarstyle      = 2     # 0 = nothing, 1 = circles, 2 = handles, 3 = diagonal stripes, 4 = diagonal stripes and handles, 5 = horizontal stripes, 6 = horizontal stripes and handles
		shadow_shades       = { 1.0, 0.7 } # draw gradient on shadow of some widgets
		sliderstyle         = 1     # 0 = nothing added, 1 = handles
		spinbuttonstyle     = 1     # 0 = no seperator, 1 = with separator
		stepperstyle        = 1     # 0 = standard, 1 = integrated stepper handles, 2 = squared steppers with round slider
		textstyle           = 0     # 0 = normal text, 1 = inset
		toolbarstyle	    = 0     # 0 = flat, 1 = glassy, 2 = gradient
		trough_shades       = { 1.1, 0.98 } # draw gradient on trough of GtkScrollbar and GtkProgressbar
	}
}

style "murrine-dark"
{
	fg[NORMAL]      = "#dfd8c8"
	fg[PRELIGHT]    = "#fff"
	fg[ACTIVE]      = "#fff"
	fg[SELECTED]    = "#fff"
	fg[INSENSITIVE] = "#99958b"

	bg[INSENSITIVE] = "#3c3b37"
	bg[NORMAL]	= "#3c3b37"
	bg[ACTIVE]      = mix (0.5, shade (0.5, @base_color), shade (2.0, @tooltip_bg_color))
	bg[SELECTED]    = mix (0.5, shade (0.5, @base_color), shade (2.0, @tooltip_bg_color))
	bg[PRELIGHT]    = mix (0.7, shade (0.5, @base_color), shade (2.0, @tooltip_bg_color))

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

	text[NORMAL]      = "#dfd8c8"
	text[PRELIGHT]    = "#fff"
	text[ACTIVE]      = "#fff"
	text[SELECTED]    = "#fff"
	text[INSENSITIVE] = "#99958b"
}

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

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

style "murrine-wide-light" = "murrine-wide"
{
	bg[NORMAL] = shade (1.07, @bg_color)
}

style "murrine-wider-light" = "murrine-wider"
{
	bg[NORMAL] = shade (1.07, @bg_color)
}

style "murrine-default-light" = "murrine-default"
{
	bg[NORMAL] = shade (1.07, @bg_color)
}

style "murrine-light"
{
	bg[NORMAL] = shade (1.07, @bg_color)
}

style "murrine-button" = "murrine-wider-light"
{
	bg[SELECTED] = mix (0.4, @bg_color, shade (3.5, @tooltip_bg_color))
}

style "murrine-notebook"
{
	bg[NORMAL] = shade (1.05, @bg_color)
	bg[ACTIVE] = shade (1.0, @bg_color)
	engine "murrine"
	{
		gradient_shades     = {1.1,0.9,0.9,0.5} # default: {1.1,1.0,1.0,1.1}
	}
}

style "murrine-tasklist" = "murrine-wide"
{
}

style "murrine-menu" = "murrine-dark"
{
	xthickness = 3
	ythickness = 3
	bg[PRELIGHT]    = mix (0.5, shade (0.5, @base_color), shade (2.0, @tooltip_bg_color))

	engine "murrine" 
	{
		#border_colors      = { "#ffffff", "#ffffff" } # colors used on borders of many widgets
		border_shades       = { 1.6, 0.7 } # gradient to draw on border
		#gradient_colors    = { "#ffffff", "#ffffff", "#ffffff", "#ffffff" } # colors used on gradient of many widgets
		#contrast            = 1.1   # 0.8 for less contrast, more than 1.0 for more contrast on borders
		glow_shade          = 1.05  # 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.15,1.0,1.0,0.7} # default: {1.1,1.0,1.0,1.1}
		#highlight_shade     = 1.02  # set highlight amount for buttons or widgets
		lightborder_shade   = 1.8   # sets lightborder amount for buttons or widgets
		lightborderstyle    = 1     # 0 = lightborder on top side, 1 = lightborder on all sides
		reliefstyle	    = 3     # 0 = flat, 1 = inset, 2 = shadow, 3 = shadow with gradient, 4 = stronger shadow with gradient
		shadow_shades       = { 1.0, 0.7 } # draw gradient on shadow of some widgets
	}
}

style "murrine-menubar" = "murrine-menu"
{
	bg[PRELIGHT]    = mix (0.5, shade (0.5, @base_color), shade (2.0, @tooltip_bg_color))

	engine "murrine" 
	{
		#border_colors      = { "#ffffff", "#ffffff" } # colors used on borders of many widgets
		border_shades       = { 2.1, 0.7 } # gradient to draw on border
		#gradient_colors    = { "#ffffff", "#ffffff", "#ffffff", "#ffffff" } # colors used on gradient of many widgets
		#contrast            = 1.1   # 0.8 for less contrast, more than 1.0 for more contrast on borders
		glow_shade          = 1.05  # 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.15,1.0,1.0,0.7} # default: {1.1,1.0,1.0,1.1}
		#highlight_shade     = 1.02  # set highlight amount for buttons or widgets
		lightborder_shade   = 1.8   # sets lightborder amount for buttons or widgets
		lightborderstyle    = 1     # 0 = lightborder on top side, 1 = lightborder on all sides
		reliefstyle	    = 3     # 0 = flat, 1 = inset, 2 = shadow, 3 = shadow with gradient, 4 = stronger shadow with gradient
		shadow_shades       = { 1.0, 0.7 } # draw gradient on shadow of some widgets
	}
}

style "murrine-menu-item" = "murrine-dark"
{
	xthickness = 3
	ythickness = 3
	bg[PRELIGHT]    = mix (0.5, shade (0.5, @base_color), shade (2.0, @tooltip_bg_color))
}

style "murrine-separator-menu-item" = "murrine-dark"
{
}

style "murrine-treeview"
{
}

style "murrine-treeview-header" = "murrine-default-light"
{
}

style "murrine-frame-title"
{
}

style "murrine-tooltips" = "murrine-wider"
{
	xthickness = 8
	ythickness = 5

	bg[NORMAL] = @tooltip_bg_color
	bg[SELECTED] = shade (0.5, @tooltip_bg_color)
	fg[NORMAL] = @tooltip_fg_color
}

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

	fg[PRELIGHT] = @selected_fg_color

	engine "murrine"
	{
		glow_shade          = 1.5
		glowstyle           = 2
	}
}

style "murrine-statusbar"
{
}

style "murrine-combobox"
{
	bg[SELECTED] = mix (0.9, @bg_color, shade (3.5, @tooltip_bg_color))
}

style "murrine-spinbutton" = "murrine-light"
{
}

style "murrine-scale" = "murrine-light"
{
}

style "murrine-hscale"
{
}

style "murrine-vscale"
{
}

style "murrine-scrollbar"
{
	bg[SELECTED] = mix (0.75, @bg_color, shade (2.0, @tooltip_bg_color))
	#bg[SELECTED] = mix (0.7, @bg_color, shade (2.0, @tooltip_bg_color))
}

style "murrine-hscrollbar"
{
}

style "murrine-vscrollbar"
{
}

style "murrine-nautilus-location"
{
	bg[NORMAL] = @selected_bg_color
}

style "metacity-frame"
{
}

style "murrine-radiocheck"
{
	text[NORMAL]   = @selected_fg_color
	text[PRELIGHT] = @selected_fg_color
	bg[SELECTED] = @selected_bg_color
	engine "murrine" 
	{
		gradient_shades     = {1.25,1.1,1.1,0.85} # default: {1.1,1.0,1.0,1.1}
	}
}

style "murrine-panel" = "murrine-dark"
{
	engine "murrine" 
	{
		#border_colors      = { "#ffffff", "#ffffff" } # colors used on borders of many widgets
		border_shades       = { 2.5, 0.6 } # gradient to draw on border
		#gradient_colors    = { "#ffffff", "#ffffff", "#ffffff", "#ffffff" } # colors used on gradient of many widgets
		#contrast            = 1.1   # 0.8 for less contrast, more than 1.0 for more contrast on borders
		glow_shade          = 1.05  # 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.15,1.0,1.0,0.7} # default: {1.1,1.0,1.0,1.1}
		#highlight_shade     = 1.02  # set highlight amount for buttons or widgets
		lightborder_shade   = 1.8   # sets lightborder amount for buttons or widgets
		lightborderstyle    = 1     # 0 = lightborder on top side, 1 = lightborder on all sides
		reliefstyle	    = 3     # 0 = flat, 1 = inset, 2 = shadow, 3 = shadow with gradient, 4 = stronger shadow with gradient
		shadow_shades       = { 1.0, 0.7 } # draw gradient on shadow of some widgets
	}
}

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

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

# Increase the x/ythickness in some widgets
class "GtkToolbar"   					style "murrine-default" 
class "GtkRange"     					style "murrine-wide"
class "GtkFrame"     					style "murrine-wide"
class "GtkSeparator" 					style "murrine-wide"
class "GtkEntry"     					style "murrine-wider"

class "GtkSpinButton"  					style "murrine-spinbutton"
class "GtkScale"       					style "murrine-scale"
class "GtkVScale"      					style "murrine-vscale"
class "GtkHScale"      					style "murrine-hscale"
class "GtkScrollbar"   					style "murrine-scrollbar"
class "GtkVScrollbar"  					style "murrine-vscrollbar"
class "GtkHScrollbar"  					style "murrine-hscrollbar"
#class "GtkMenuBar"  					style:highest "murrine-menubar"

class "GtkRadioButton"                        		style:highest "murrine-radiocheck"
class "GtkCheckButton"                           	style:highest "murrine-radiocheck"

# Use this to customize Metacity colours (causes issues with KDE/gtk-window-decorator)
class "MetaFrames" 					style "metacity-frame"

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

# This is not perfect, it could be done better
# (That is modify *every* widget in the notebook, and change those back that
# we really don't want changed)
widget_class "*<GtkNotebook>*<GtkEventBox>"     	style "murrine-notebook"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"		style "murrine-notebook"
widget_class "*<GtkNotebook>*<GtkLayout>"       	style "murrine-notebook"
widget_class "*<GtkNotebook>*<GtkViewport>"		style "murrine-notebook"
widget_class "*<GtkNotebook>*<GtkScrolledWindow>"	style "murrine-notebook"

widget_class "*<GtkButton>"      			style "murrine-button"
widget_class "*<GtkNotebook>"    			style "murrine-notebook"
widget_class "*<GtkStatusbar>*"  			style "murrine-statusbar"

widget_class "*<GtkComboBoxEntry>*"			style:highest "murrine-combobox"
widget_class "*<GtkComboBox>*"         			style:highest "murrine-combobox"
widget_class "*<GtkOptionMenu>*"         		style:highest "murrine-combobox"
widget_class "*<GtkCombo>*"         			style:highest "murrine-combobox"

widget_class "*<GtkMenuBar>*"           		style "murrine-menubar"
widget_class "*<GtkMenu>*"              		style "murrine-menu"
#widget_class "*<GtkMenu>*Check*"             style:highest "murrine-menu"
#widget_class "*<GtkMenu>*Radio*"             style:highest "murrine-menu"
widget_class "*<GtkMenuItem>*"          		style "murrine-menu-item"
widget_class "*<GtkSeparatorMenuItem>*" 		style "murrine-separator-menu-item"

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

widget_class "*<GtkProgress>"				style "murrine-progressbar"
widget_class "*<GtkProgressBar>"       			style "murrine-progressbar"

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

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

# 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 "murrine-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 "murrine-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 "murrine-combobox-text-color-workaround"
{
	text[NORMAL]      = @fg_color
	text[PRELIGHT]    = @fg_color
	text[ACTIVE]      = @fg_color
	text[SELECTED]    = @selected_fg_color
	text[INSENSITIVE] = shade (0.55, @bg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>"		style "murrine-combobox-text-color-workaround"

style "murrine-menuitem-text-is-fg-color-workaround"
{
	text[NORMAL]        = "#dfd8c8"
	text[PRELIGHT]      = @selected_fg_color
	text[ACTIVE]        = @fg_color
	text[SELECTED]      = @selected_fg_color
	text[INSENSITIVE]   = shade (0.55, @bg_color)
}

widget "*.gtk-combobox-popup-menu.*"   			style "murrine-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 "murrine-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] = shade (0.55, @bg_color)
}

widget_class "*<GtkListItem>*" 				style "murrine-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 "murrine-fg-is-text-color-workaround"

style "murrine-evo-new-button-workaround"
{

	engine "murrine"
	{
		toolbarstyle = 0
	}
}

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

# Panel stuff
widget "*PanelWidget*" 					style "murrine-panel"
widget "*PanelApplet*" 					style "murrine-panel"
widget "*fast-user-switch*"				style "murrine-panel" # Workaround for Fast User Switch applet
class "PanelApp*" 					style "murrine-panel"
class "PanelToplevel*" 					style "murrine-panel"
widget_class "*Panel*<GtkMenuBar>*"           		style:highest "murrine-menubar" # The panel menubar
widget "*TomboyTray*"					style "murrine-panel" # Workaround for Tomboy
widget "*TomboyApplet*"					style "murrine-panel"
widget "ido-offscreen-scale" 				style "murrine-panel" # Volume control applet's scale

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