# Lucidity
#
# Authors:
# Emily Wind <naomi.wind@gmail.com>
#
# Feel free to modify and share. :)

gtk_color_scheme = "fg_color:#3a3836\nbg_color:#e6e4e2\nbase_color:#fff\ntext_color:#575553\nselected_bg_color:#3a3836\nselected_fg_color:#fff\ntooltip_bg_color:#3a3836\ntooltip_fg_color:#fff"

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

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

	GtkNotebook	::tab-overlap		= -1

	GtkPaned	::handle-size		= 6

	GtkRange	::trough-border		= 2
	GtkRange	::slider-width		= 14
	GtkRange	::stepper-size		= 14

	GtkScale	::slider-length		= 20
	GtkScale	::trough-side-details	= 1
	GtkScrollbar	::min-slider-length	= 30

	GtkMenuBar	::internal-padding	= 0
	GtkExpander	::expander-size		= 12
	GtkToolbar	::internal-padding	= 1
	GtkTreeView	::expander-size		= 12
	GtkTreeView	::vertical-separator	= 0

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

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

	bg[NORMAL]	= @bg_color
	bg[PRELIGHT]	= shade (1.02, @bg_color)
	bg[ACTIVE]	= shade (1.80, @selected_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.80, @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.65, @bg_color)

	engine "murrine" 
	{
		animation		= TRUE	# FALSE = disabled, TRUE = enabled
		arrowstyle		= 0	# 0 = unfilled arrows, 1 = filled arrows
		colorize_scrollbar	= TRUE	# FALSE = disabled, TRUE = enabled
		contrast		= 1.0	# 0.8 for less contrast, more than 1.0 for more contrast on borders
		comboboxstyle		= 0	# 0 = do not colourise, 1 = colourise
		expanderstyle		= 1	# 0 = arrow, 1 = circle with plus/minus, 2 = buttons with plus/minus
		focusstyle		= 3	# 0 = disabled, 1 = dots, 2 = small rectangle, 3 = rectangle touching borders
		focus_color		= shade (1.4, @selected_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		= 0	# 0 = top, 1 = bottom, 2 = top and bottom, 3 = center (vertical), 4 = center (horizontal) 
		gradient_shades		= {1.02,1.0,1.0,0.9}
		highlight_shade		= 1.0	# set highlight amount for buttons or widgets
		lightborder_shade	= 1.05	# 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		= 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		= 1.4	# Change the shade when something is hovered over
		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		= 4	# Increase number to 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
		sliderstyle		= 0	# 0 = nothing added, 1 = handles
		stepperstyle		= 1	# 0 = standard, 1 = integrated stepper handles, 2 = unknown
		toolbarstyle		= 2	# 0 = flat, 1 = glassy, 2 = gradient
	}
	
}

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

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

style "button" = "wider"
{
	bg[SELECTED]	= shade (0.65, @bg_color) # pre-selected buttons, keep same as focus colour
	bg[ACTIVE]	= shade (0.85, @bg_color)
	fg[ACTIVE]	= @fg_color

	engine "murrine"
	{
		lightborder_shade	= 2.0  # sets lightborder amount for buttons or widgets
		lightborderstyle	= 1
		gradient_shades		= {0.92,0.9,0.9,0.85}
		roundness		= 10
		contrast		= 1.4
		textstyle		= 1
	}
}

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

	engine "murrine"
	{
		focusstyle	= 2
		gradient_shades = {1.02,1.0,1.0,0.9}
	}
}

style "notebook-bg" {
	fg[ACTIVE] = shade (1.8, @fg_color)
}

style "tasklist" = "wide"
{
}

style "menu" = "wider"
{
	fg[NORMAL]	= @fg_color
	bg[NORMAL]	= shade (1.02, @bg_color)
	bg[SELECTED]	= shade (1.2, @selected_bg_color)
	bg[INSENSITIVE] = shade (1.02, @bg_color)
	fg[PRELIGHT]	= @selected_fg_color
}

style "menubar"
{
	fg[PRELIGHT]	= @selected_fg_color
	bg[SELECTED]	= @selected_bg_color

	engine "murrine"
	{
		gradient_shades	= {0.85, 0.96, 0.95, 1.0}
	}
}

style "menu-item" = "menu"
{
	bg[PRELIGHT]	= shade (1.02, @selected_bg_color)
	bg[SELECTED]	= @selected_bg_color

	engine "murrine"
	{
		gradient_shades		= {1.02, 1.0, 1.0, 0.95}
		roundness		= 4
	}
}

style "toolbar" {
	engine "murrine" {
		textstyle = 1
	}
}

style "separator-menu-item"
{
}

style "treeview"
{
}

style "treeview-header" = "default"
{
	bg[ACTIVE] = @bg_color

	engine "murrine" {
		lightborder_shade	= 2.0
		lightborderstyle	= 1
		gradient_shades		= {1.02,1.0,1.0,0.95}
		roundness		= 0
		contrast		= 1.4
	}
}

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

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

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

	engine "murrine"
	{
		roundness	= 10
		trough_shades	= { 0.15, 0.3 }
	}
}

style "progressbar"
{
	xthickness	= 1
	ythickness	= 1

	bg[ACTIVE]	= @bg_color
	bg[SELECTED]	= @selected_bg_color

	# Text "in front" of the progressbar
	fg[PRELIGHT]	= @selected_fg_color
	
	engine "murrine"
	{
		gradient_shades = {1.3,1.0,1.0,0.9}
		border_colors = {"#E6DDD5", "#E6DDD5" }
		contrast = 1.4
		roundness = 10
	}
}

style "statusbar"
{
}

style "entry" = "wider"
{
	engine "murrine" {
	}
}
style "comboboxentry"
{
}

style "spinbutton"
{
}

style "scale"
{
	bg[ACTIVE]		= shade (0.80, @bg_color)
	bg[PRELIGHT]		= shade (1.08, @bg_color)
	GtkRange::slider-width	= 13

	engine "murrine" 
	{
		contrast	= 1.2
		glowstyle	= 0
		gradient_shades	= {1.1,1.05,1.02,1.0}
		roundness	= 10
	}
}

style "hscale"
{
}

style "vscale"
{
}

style "scrollbar"
{
	bg[NORMAL]		= @selected_bg_color
	bg[SELECTED]		= @selected_bg_color
	bg[INSENSITIVE]		= "#000"
	engine "murrine"
	{
		roundness	= 10
		contrast	= 1.2
		gradient_shades	= {1.2,1.1,1.05,1.0}
	}
}

style "hscrollbar"
{
}

style "vscrollbar"
{

}

style "iconview" {
	engine "murrine" {
		roundness	= 4
		border_shades	= {1.16, 1.0}
		glow_shade	= 1.1
		glowstyle	= 5
	}
}

style "nautilus-location"
{
	bg[NORMAL]		= @selected_bg_color
	bg[ACTIVE]		= @selected_bg_color
	bg[PRELIGHT]		= @selected_bg_color

	fg[NORMAL]		= @bg_color
	fg[PRELIGHT]		= @bg_color

	text[NORMAL]		= @bg_color
	text[PRELIGHT]		= @bg_color
	text[ACTIVE]		= @bg_color
	text[SELECTED]		= @bg_color
	text[INSENSITIVE]	= shade (0.6, @bg_color)
}

style "nautilus-sidebar" {
	bg[PRELIGHT]			= "#000"

	font_name			= "Regular"

	# We want the sidebar to be the standard background colour all the way
	GtkTreeView::odd_row_color	= @bg_color
	GtkTreeView::even_row_color	= @bg_color

	GtkPaned::handle_size		= 0
	GtkWidget::wide_separator	= 1
	GtkWidget::separator_width	= 1
	GtkWidget::separator_height	= 0
	GtkWidget::focus_line_width	= 0
	GtkWidget::draw_border		= {0,0,0,0}

	# These make the padding from left window edge a little more sane
	GtkTreeView::vertical_separator	= 2
	GtkTreeView::horizontal_separator = 15
	GtkTreeView::indent-expanders	= 1 # 1 means TRUE
	GtkTreeView::expander-size	= 8
	GtkExpander::expander_spacing	= 16
	GtkButton::image_spacing	= 4
	xthickness			= 8
	ythickness			= 1
}
style "nautilus-handle"
{
	GtkPaned::handle-size	= 1
	
	engine "pixmap"
	{
		image # for the thin gray line separating the sidepane and viewpane
		{
		    function	= HANDLE
		    recolorable	= TRUE
		    file	= "Images/handle-nautilus.png"
		    stretch	= TRUE
		    border	= { 0, 0, 0, 0 }
		}
	}
}
style "nautilus-sidebar-title"
{
	GtkExpander::expander_spacing	= 1
	GtkArrow::arrow-scaling		= 0.6 # allowed: 0.1 ~ 1.0 (0.6 is an approximation to get 9 by 9 pixels arrow)
}

style "radiocheck-button"
{
	text[NORMAL]	= @fg_color
	text[PRELIGHT]	= @fg_color
	bg[SELECTED]	= @bg_color

	engine "murrine"
	{
		textstyle = 0
		lightborder_shade = 1.05
	}
}

style "radiocheck-menu"
{
	text[NORMAL]	= @fg_color
	text[PRELIGHT]	= @selected_fg_color
}

style "panel"
{
	xthickness = 1

	bg_pixmap[NORMAL] = "Images/panelbg.png"
	
	engine "murrine"
	{
		textstyle = 0
		roundness = 4
	}
}

style "panel-handle" 
{
	engine "pixmap"
	{    
		image
		{
			function	= HANDLE
			file		= "Images/blank.png"
			stretch		= TRUE
		}    

		image
		{
			function	= HANDLE
			file		= "Images/blank.png"
			stretch		= TRUE
		}
	}
}

style "terminal"
{
	text[NORMAL] = @tooltip_fg_color
	base[NORMAL] = @tooltip_bg_color

	TerminalScreen::background-darkness = 0.95
}

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

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

# Increase the x/ythickness in some widgets
class "GtkRange"     					style "wide"
class "GtkFrame"     					style "wide"
class "GtkSeparator" 					style "wide"
class "GtkEntry"     					style "entry"

class "GtkSpinButton"  					style "spinbutton"
class "GtkScale"       					style "scale"
class "GtkVScale"      					style "vscale"
class "GtkHScale"      					style "hscale"
class "GtkScrollbar"   					style:highest "scrollbar"
class "GtkVScrollbar"  					style "vscrollbar"
class "GtkHScrollbar"  					style "hscrollbar"
class "GtkIconView"					style "iconview"

class "GtkRadio*"                        		style "radiocheck-menu"
class "GtkCheck*"                         		style "radiocheck-menu"
widget_class "*<GtkCheckMenuItem>*" 			style "radiocheck-menu"
widget_class "*<GtkRadioMenuItem>*" 			style "radiocheck-menu"

# General matching following, the order is chosen 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 "*<GtkButton>"				style "button"
widget_class "*<GtkButton>*<GtkLabel>"			style "button"
widget_class "*<GtkNotebook>"				style "notebook"
widget_class "*<GtkNotebook>*<GtkEventBox>"		style "notebook"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"		style "notebook"
widget_class "*<GtkNotebook>*<GtkLayout>"		style "notebook"
widget_class "*<GtkNotebook>*<GtkViewport>"		style "notebook"
widget_class "*<GtkNotebook>*<GtkScrolledWindow>"	style "notebook"
widget_class "*<GtkNotebook>*<GtkLabel>"		style "notebook-bg"
widget_class "*<GtkNotebook>*<GtkButton>"		style "button"
widget_class "*<GtkNotebook>*<GtkButton>*<GtkLabel>"	style "button"
widget_class "*<GtkToolbar>*"				style "toolbar"

widget_class "*<GtkRadioButton>*"			style "radiocheck-button"
widget_class "*<GtkCheckButton>*"			style "radiocheck-button"
class "GtkRadioButton"                        		style "radiocheck-button"
class "GtkCheckButton"                         		style "radiocheck-button"
widget_class "*<GtkStatusbar>*"				style "statusbar"

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

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

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

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

widget_class "*<GtkMenuItem>.*.<GtkScale>"		style "scale"

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

# Workarounds for Evolution
widget_class "*.ETable.ECanvas"				style "treeview-header"
widget_class "*.ETree.ECanvas"				style "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 "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 "nautilus-location"

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 "*Nautilus*Splitter"			style "nautilus-handle"

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

style "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.65, @bg_color)
}

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] = shade (0.65, @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"

# Theme panel elements
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 "*Mail*"		style "panel"
widget_class "*notif*"		style "panel"
widget_class "*Notif*"		style "panel"
class "PanelAppletFrame"	style:highest "panel-handle" # Hide ugly handles

# Theme terminal
class "TerminalScreen"		style "terminal"
