# Author: SolidSlash
# Theme: Murrine-Sandy
# Description: based on perfectska04's Murrine-Colors theme

# These are the official colors of the theme, you can change them in GNOME's appearance preferences.
gtk_color_scheme = "fg_color:#505050\nbg_color:#fdfbf8\nbase_color:#fdfbf8\ntext_color:#1A1A1A\nselected_bg_color:#ecd9a6\nselected_fg_color:#1A1A1A\ntooltip_bg_color:#F5F5B5\ntooltip_fg_color:#000"

# This specifies the sizes of panel icons. 16 = smaller icons, 24 = default-sized icons.
gtk-icon-sizes = "gtk-button=16,16"
# gtk-menu-images = 0 # Uncomment if you want to get rid of images in menus
# gtk-icon-sizes = "gtk-button=16,16"  # This makes button icons smaller, which in turn makes buttons smaller.
# gtk-icon-sizes = "gtk-large-toolbar=24,24:gtk-small-toolbar=16,16"  # Uncomment or edit for smaller toolbars.
# gtk-button-images = 0  # Enables or disables icons on gtk-buttons (OSX-like).
# gtk-menu-popup-delay = 0  # Makes menus pop up faster!

include "panel.rc"  # This gives you gradient panel backgrounds. Comment out to get default gnome flat panels. Edit included panel.rc file for even more panel customization or to get dark panels! 

style "theme-default"
{
	GtkButton      ::child-displacement-x = 0  # Pressed button icon displacement.
	GtkButton      ::child-displacement-y = 1  # Pressed button icon displacement.
	GtkButton      ::default-border       = { 0, 0, 0, 0 }
	GtkCheckButton ::indicator-size       = 14

	GtkPaned       ::handle-size          = 6

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

	GtkScale       ::slider-length        = 30  # Length of sliders.
	GtkScale       ::trough-side-details  = 0
	GtkScrollbar   ::min-slider-length    = 30  # Min. length of scrollbars.

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

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

	GtkButton      ::focus-padding	      = 0  # This can give you a more compact appearance.
  	GtkScrolledWindow ::scrollbar-spacing  = 2  # This sets the spacing between scrollbars

 	GtkToolbar     ::shadow-type       = GTK_SHADOW_NONE  # Makes toolbars flat and unified.

  	xthickness = 1
  	ythickness = 1

	fg[NORMAL]        = "#505050"
	fg[PRELIGHT]      = "#222222"
	fg[ACTIVE]        = "#505050"
	fg[SELECTED]      = "#fdfbf8"
	fg[INSENSITIVE]   = "#A2A2A2"

	bg[NORMAL]        = "#fdfbf8"
	bg[PRELIGHT]      = "#efefef"
	bg[ACTIVE]        = "#ECE9D8"
	bg[SELECTED]	    = "#e7d39c"
	bg[INSENSITIVE]   = "#E4E0CA"

	base[NORMAL]      = "#fdfbf8"
	base[PRELIGHT]    = "#6590b8"
	base[ACTIVE]      = "#ECE9D8"
	base[SELECTED]    = "#d9c07e"
	base[INSENSITIVE] = "#ECE9D8"

	text[NORMAL]      = "#505050"
	text[PRELIGHT]    = "#505050"
	text[ACTIVE]      = "#505050"
	text[SELECTED]    = "#fdfbf8"
	text[INSENSITIVE] = "#A2A2A2"

  engine "murrine" 
  {
		scrollbar_color = "#ece9d8"  # Uncommenting this gives you colorful scrollbars.
		contrast = 1.0
		glazestyle = 3  # 0 = flat hilight, 1 = curved hilight, 2 = concave style, 3 = top curved hilight, 4 = beryl hilight
		menubarstyle = 0  # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped
		menubaritemstyle = 1  # 0 = menuitem look, 1 = button look
		menuitemstyle = 0  # 0 = flat, 1 = glassy, 2 = striped
		listviewheaderstyle = 1  # 0 = flat, 1 = glassy, 2 = raised
		listviewstyle = 0  # 0 = nothing, 1 = dotted
		scrollbarstyle = 4  # 0 = nothing, 1 = circles, 2 = handles, 3 = diagonal stripes, 4 = diagonal stripes and handles, 5 = horizontal stripes, 6 = horizontal stripes and handles
		hilight_ratio = 0.94  # Sets the amount of buttons or widgets hilight. Lower means less gloss.
		roundness = 0  # Overall roundness of the theme.
		animation = TRUE  # FALSE disables progressbar animations.
                gradients = TRUE
		menustyle = 0
   }
}

style "evolution-hack" = "theme-default"
{	
	bg[NORMAL]   = shade (1.02, @bg_color)  # Color for evo treeview headers.
	bg[PRELIGHT]   = shade (1.06, @bg_color)  # Color for evo treeview header prelight.
	bg[ACTIVE]	= shade (0.90, @bg_color)  # Color for unfocused evo selected items.
	bg[SELECTED]	= shade (1.30, @selected_bg_color)  # Color for evo selected items.
	fg[ACTIVE]      = @selected_fg_color
	fg[SELECTED]    = @selected_fg_color
}

style "theme-wide"
{
	bg[SELECTED]	  = @selected_bg_color  # Can't change, or clowns will eat you.
	xthickness = 2  # Can't change, or clowns will eat you.
	ythickness = 2  # Can't change, or clowns will eat you.
}

style "theme-wider"
{
	bg[SELECTED]	  = @selected_bg_color  # Can't change, or clowns will eat you.
	xthickness = 3  # Can't change, or clowns will eat you.
	ythickness = 3  # Can't change, or clowns will eat you.
}

style "theme-button" = "theme-wider"
{
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of buttons.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted buttons.
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed buttons.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive buttons.
}

style "theme-notebook" = "theme-wider"
{
	bg[NORMAL] = shade (1.04, @bg_color)  # Tab backgrounds.
	bg[ACTIVE] = shade (0.98, @bg_color)  # Unfocused tab background.
  engine "clearlooks"  # Uses clearlooks engine for better looking, rounded notebooks.
  {
}
}

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

style "theme-menu" = "theme-wider"
{
	bg[NORMAL] = shade (1.0, @bg_color)  # Color of menu background.
  engine "murrine" 
  {
#	hilight_ratio = 0.92  # Gloss of menu-items.
	roundness = 0   # Roundness of menu-items.
}
}

style "theme-menu-item"  = "theme-wider"
{
	fg[PRELIGHT] = @selected_fg_color  # Color of selected menu item text.
	bg[SELECTED]    = shade (1.20, @selected_bg_color)  # Color of menu items.
	bg[PRELIGHT]    = shade (1.20, @selected_bg_color)  # Color of menu items.
}

style "theme-separator-menu-item"
{
	xthickness = 1
	ythickness = 2

#  Code for pixmap menu separators.
  engine "pixmap"
  {
    image
    {
      function	  = HLINE
      recolorable         = TRUE
      file	  = "Menu-Menubar/menu-line.png"
      border	  = { 1, 1, 1, 1 }
      stretch	  = TRUE
    }
}
}

style "theme-treeview"
{
}

style "theme-treeview-header" = "theme-default"
{
	xthickness = 2
	ythickness = 1
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of treeviews.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted treeviews.
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed treeviews.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive treeviews.
  engine "murrine" 
  {
	glazestyle = 0  # Gloss style for treeview headers.
	roundness = 0  # Roundness for treeview headers. (Fix for evolution mail)
#	hilight_ratio = 0.92  # Gloss of treeview headers.
}
}

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

style "theme-tooltips" = "theme-wider"
{
	bg[NORMAL] = @tooltip_bg_color
	fg[NORMAL] = @tooltip_fg_color
  engine "clearlooks"  # Uses clearlooks engine for better looking tooltips.
  {
}
}

style "theme-progressbar" = "theme-wide"
{
	fg[PRELIGHT] = @selected_fg_color  # Progressbar prelighted text.
}

style "theme-statusbar"
{
  engine "murrine" 
  {
	contrast = 2.0  # Makes statusbar line lighter. (adjust it if you change background color)
}
}

style "theme-comboboxentry"
{
}

style "theme-spinbutton"
{
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of spinbuttons.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted spinbuttons.
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed spinbuttons.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive spinbuttons.
}

style "theme-scale"
{
	GtkRange       ::slider-width         = 13  # Width of sliders.
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of sliders.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted sliders.
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed sliders.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive sliders.
}

style "theme-hscale" = "theme-scale"
{
}

style "theme-vscale" = "theme-scale"
{
}

style "theme-scrollbar"
{
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of scrollbars.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted scrollbars.?
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed scrollbars.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive scrollbars.
  engine "murrine" 
  {
#	hilight_ratio = 0.92  # Gloss of scrollbars.
	glazestyle = 0  # Gloss style of scrollbars.
	roundness = 0  # Scrollbar roundness.
}
}

style "theme-hscrollbar" = "theme-scrollbar"
{
}

style "theme-vscrollbar" = "theme-scrollbar"
{
}

style "theme-menubar"
{
}

style "metacity-frame"
{
  bg[SELECTED]  = @selected_bg_color  # Color for metacity borders.
}

style "theme-nautilus-location"
{
	bg[NORMAL] = shade (1.30, @selected_bg_color)  # Workaround for nautilus' messages.
}

style "theme-radiocheck" = "theme-default"
{
	text[PRELIGHT]	= @base_color  # Color for prelight of radio buttons.
}
class "GtkRadio*"	style "theme-radiocheck"
class "GtkCheck*"	style "theme-radiocheck"

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

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

# Increase the x/ythickness in some widgets.
class "GtkToolbar"   style "theme-default" 
class "GtkRange"     style "theme-wide"
class "GtkFrame"     style "theme-wide"
class "GtkEntry"     style "theme-wider"
class "MetaFrames"   style "metacity-frame"
class "GtkSeparator" style "theme-wide"
class "GtkWindow"      style "metacity-frame"

class "GtkSpinButton"  style "theme-spinbutton"
class "GtkScale"       style "theme-scale"
class "GtkVScale"      style "theme-vscale"
class "GtkHScale"      style "theme-hscale"
class "GtkScrollbar"   style "theme-scrollbar"
class "GtkVScrollbar"  style "theme-vscrollbar"
class "GtkHScrollbar"  style "theme-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 "theme-notebook"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"  style "theme-notebook"
widget_class "*<GtkNotebook>*<GtkLayout>"       style "theme-notebook"

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

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

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

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

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

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

# Workarounds for Evolution
widget_class "*.ETable.ECanvas"    style "theme-treeview-header"
widget_class "*.ETree.ECanvas"    style "theme-treeview-header"
widget_class "*GtkCTree*"	style "evolution-hack"
widget_class "*GtkList*"	style "evolution-hack"
widget_class "*GtkCList*"	style "evolution-hack"
widget_class "*.ETree.*"	style "evolution-hack"
widget_class "*EInfoLabel*"	style "evolution-hack"

# 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 "theme-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 "theme-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 "theme-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 "theme-text-is-fg-color-workaround"

style "theme-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 "theme-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 "theme-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 "theme-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 "theme-fg-is-text-color-workaround"

# My workarounds (Specific to this theme):
widget_class "*.GtkNotebook.*.GtkViewport" style "theme-notebook"  # Fixes some tab backgrounds.

# IMPORTANT : If you're still looking how to change panel's color .. check the panel.rc file !
# Feel free to modify.
