# Ubuntu Human-Murrine Colorscheme
#
# Authors:
# Kenneth Wimer <kwwii@ubuntu.com>
# Conn O'Griofa <connogriofa@gmail.com>
#
# Feel free to modify and share!

gtk_color_scheme = "fg_color:#101010\nbg_color:#EFEBE7\nbase_color:#FFF\ntext_color:#1A1A1A\nselected_bg_color:#FFA443\nselected_fg_color:#1A1A1A\ntooltip_bg_color:#F5F5B5\ntooltip_fg_color:#000"

gtk-icon-sizes = "panel-menu=16,16 : gtk-menu=16,16 : gtk-button=16,16 : gtk-small-toolbar=16,16 : gtk-large-toolbar=16,16 : gtk-dialog=32,32 : gtk-dnd=32,32"

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

	GtkWidget      ::focus_padding        = 0

	GtkButtonBox   ::child_min_width      = 0
	GtkButtonBox   ::child_min_heigth     = 0
	GtkButtonBox   ::child_internal_pad_x = 0
	GtkButtonBox   ::child_internal_pad_y = 0

	GtkPaned       ::handle-size          = 4

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

	GtkScale       ::trough-side-details  = 0	       # 0 = thin slider, >0 = thick slider
	GtkScrollbar   ::min-slider-length    = 30
	GtkScrolledWindow ::scrollbar_spacing = 0

	GtkMenuBar     ::internal-padding     = 0
	GtkToolbar     ::internal-padding     = 0
	GtkToolbar     ::space-size           = 10
	GtkTreeView    ::vertical-separator   = 0
	GtkTreeView    ::expander_size        = 11
	GtkTreeView    ::expander_spacing     = 0
	GtkTreeView    ::horizontal-separator = 0

	GtkExpander    ::expander_size     = 11
	GtkExpander    ::expander_spacing  = 0
	GtkScale       ::slider-length     = 23
	GtkScale       ::value_spacing     = 0

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

	GtkOptionMenu  ::indicator_size       = 0  
	GtkOptionMenu  ::indicator_spacing    = 0

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

	#GtkWidget      ::link-color           = @fg_color
	#GtkWidget      ::visited-link-color   = shade (0.2, @fg_color)

	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.7, @bg_color)

	bg[NORMAL]        = @bg_color
	bg[PRELIGHT]      = shade (0.98, @bg_color)
	bg[ACTIVE]        = shade (0.85, @bg_color)
	bg[SELECTED]	  = mix (0.25, @tooltip_fg_color, @selected_bg_color) # Gnome Appearances Preferences workaround
	bg[INSENSITIVE]   = @bg_color

	base[NORMAL]      = @base_color
	base[PRELIGHT]    = shade (0.95, @bg_color)
	base[ACTIVE]      = mix(0.50, shade (1.05, @selected_bg_color), @tooltip_bg_color)
	base[SELECTED]    = mix(0.50, shade (1.05, @selected_bg_color), @tooltip_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.7, @bg_color)

	engine "murrine" 
	{
		animation           = TRUE  # FALSE = disabled, TRUE = enabled
		colorize_scrollbar  = FALSE # FALSE = disabled, TRUE = enabled
		contrast            = 1.0   # 0.8 for less contrast, more than 1.0 for more contrast on borders
		glazestyle          = 3     # 0 = flat highlight, 1 = curved highlight, 2 = concave style, 3 = top curved highlight, 4 = beryl highlight
		gradient_shades     = {1.09,1.06,1.04,1.01} # default: {1.1,1.0,1.0,1.1}
		gradients           = TRUE  # FALSE = disabled, TRUE = enabled
		highlight_ratio     = 1.04  # set highlight amount for buttons or widgets
		lightborder_ratio   = 1.5   # 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        = 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
		reliefstyle	    = 2     # 0 = flat, 1 = inset, 2 = shadow
		rgba		    = TRUE  # 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
		sliderstyle         = 1     # 0 = nothing added, 1 = handles
		stepperstyle        = 0     # 0 = standard, 1 = integrated stepper handles, 2 = unknown
		style		    = MURRINE # engine style options: CANDIDO, CLEARLOOKS, MIST, MURRINE, NODOKA
		toolbarstyle	    = 0     # 0 = flat, 1 = glassy, 2 = gradient
	}
}

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

	bg[SELECTED] = @selected_bg_color
}

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

	bg[SELECTED] = @selected_bg_color
}

style "murrine-button" = "murrine-wider"
{
	xthickness      = 0
	ythickness      = 0
	bg[NORMAL]      = shade (0.95, @bg_color)
	bg[SELECTED]    = mix(0.70, shade (1.00, @selected_bg_color), @tooltip_bg_color)
	bg[INSENSITIVE] = shade (0.98, @bg_color)
}

style "murrine-notebook"
{
	xthickness      = 0
	ythickness      = 0
	bg[NORMAL]   = shade (1.0, @bg_color)
	bg[ACTIVE]   = shade (0.89, @bg_color)
	bg[SELECTED] = @selected_bg_color

	engine "murrine" 
	{
		contrast = 1.05
		highlight_ratio = 1.06
	}
}

style "murrine-tasklist" = "murrine-wide"
{
	xthickness      = 0
	ythickness      = 0
}

style "murrine-menu" = "murrine-wider"
{
	xthickness      = 0
	ythickness      = 0
	bg[NORMAL] = shade (1.04, @bg_color)
}

style "murrine-menubar"
{
}

style "murrine-menu-item" = "murrine-wider"
{
	xthickness      = 1
	ythickness      = 1
	bg[PRELIGHT] = mix(0.70, shade (1.0, @selected_bg_color), @tooltip_bg_color)
	bg[SELECTED] = mix(0.70, shade (1.0, @selected_bg_color), @tooltip_bg_color)
	fg[PRELIGHT] = @selected_fg_color
}

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

style "murrine-treeview"
{
	xthickness      = 0
	ythickness      = 0
	bg[SELECTED] = @selected_bg_color
	fg[SELECTED] = @base_color
}

style "murrine-treeview-header" = "murrine-default"
{
	xthickness      = 0
	ythickness      = 0
	bg[NORMAL]      = shade (0.95, @bg_color)
	bg[SELECTED]    = mix(0.50, shade (1.05, @selected_bg_color), @tooltip_bg_color)
	bg[INSENSITIVE] = shade (0.93, @bg_color)
}

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

style "murrine-tooltips" = "murrine-wider"
{
	bg[NORMAL] = @tooltip_bg_color
	fg[NORMAL] = @tooltip_fg_color
}

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

	bg[SELECTED] = @selected_bg_color
	fg[PRELIGHT] = @base_color

	engine "murrine" 
	{
		contrast = 1.12        # darken progress bar background
		highlight_ratio = 1.08
	}
}

style "murrine-statusbar"
{
}

style "murrine-comboboxentry"
{
}

style "murrine-spinbutton"
{
	#bg[NORMAL]      = shade (0.95, @bg_color) # we need to fix rectangular border bug on spinbutton
	bg[INSENSITIVE] = shade (0.99, @bg_color)

	engine "murrine" 
	{
		gradient_shades = {1.03,1.00,0.98,0.95}
	}
}

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

	bg[NORMAL]      = shade (0.95, @bg_color)
	bg[INSENSITIVE] = shade (0.99, @bg_color)

	engine "murrine" 
	{
		contrast = 1.2
	}
}

style "murrine-hscale"
{
}

style "murrine-vscale"
{
}

style "murrine-scrollbar"
{
	bg[NORMAL]      = shade (0.95, @bg_color)
	bg[INSENSITIVE] = shade (0.99, @bg_color)

	engine "murrine" 
	{
		contrast = 1.2
	}
}

style "murrine-hscrollbar"
{
}

style "murrine-vscrollbar"
{
}

style "murrine-nautilus-location"
{
	bg[NORMAL] = mix(0.50, shade (1.05, @selected_bg_color), @tooltip_bg_color)
}

style "metacity-frame"
{
	bg[SELECTED] = mix (0.25, @tooltip_fg_color, @selected_bg_color)
}

style "murrine-radiocheck" = "murrine-default"
{
	text[PRELIGHT] = @base_color # text on mouseover
}

style "murrine-panel"
{
	bg[SELECTED] = mix(0.70, shade (1.05, @selected_bg_color), @tooltip_bg_color)
}

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

# Theme radio buttons and checkmarks
class "GtkRadio*"                        		style "murrine-radiocheck"
class "GtkCheck*"                           		style "murrine-radiocheck"

# Keep proper colour for Metacity
class "MetaFrames" 					style "metacity-frame"
#class "GtkWindow"    			    		style "metacity-frame"

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

# 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 "*<GtkButton>"      			style "murrine-button"
widget_class "*<GtkNotebook>"    			style "murrine-notebook"
widget_class "*<GtkStatusbar>*"  			style "murrine-statusbar"

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

widget_class "*<GtkMenuBar>*"           		style "murrine-menubar"
widget_class "*<GtkMenu>*"              		style "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 "*<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.7, @bg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>"		style "murrine-combobox-text-color-workaround"

style "murrine-menuitem-text-is-fg-color-workaround"
{
	text[NORMAL]        = @fg_color
	text[PRELIGHT]      = @selected_fg_color
	text[ACTIVE]        = @fg_color
	text[SELECTED]      = @selected_fg_color
	text[INSENSITIVE]   = shade (0.7, @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"
{
	bg[SELECTED]    = mix(0.50, shade (1.05, @selected_bg_color), @tooltip_bg_color)
	fg[NORMAL]      = @text_color
	fg[PRELIGHT]    = @text_color
	fg[ACTIVE]      = @selected_fg_color
	fg[SELECTED]    = @selected_fg_color
	fg[INSENSITIVE] = shade (0.7, @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"

# Theme panel elements
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 "*Mail*" 					style "murrine-panel"
widget_class "*notif*" 					style "murrine-panel"
widget_class "*Notif*" 					style "murrine-panel"
