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

gtk_color_scheme = "fg_color:#3a3a3a\nbg_color:#ededed\nbase_color:#fff\ntext_color:#575757\nselected_bg_color:#575757\nselected_fg_color:#fff\ntooltip_bg_color:#575757\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

	GtkMenuBar::shadow_type = GTK_SHADOW_NONE
	GtkStatusbar::shadow_type = GTK_SHADOW_NONE
	GtkHandleBox::shadow_type = GTK_SHADOW_NONE
	GtkToolbar::shadow_type = GTK_SHADOW_NONE

	GtkEntry::progress-border = { 2, 2, 2, 2 }

	GtkProgressBar::min-horizontal-bar-height = 14
	GtkProgressBar::min-vertical-bar-width = 14

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

	xthickness = 1
	ythickness = 1

	GtkWidget::link-color = @text_color
	GtkWidget::visited-link-color = shade (1.4, @text_color)

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

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

	base[NORMAL]	= @base_color
	base[PRELIGHT]	= shade (1.2, @bg_color)
	base[ACTIVE]	= shade (1.4, @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.1 # 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.1, 1.0, 1.0, 0.90 }
		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 = 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
		separatorstyle = 1 # 0 = Solid, 1 = Smooth
		sliderstyle = 0	# 0 = nothing added, 1 = handles
		stepperstyle = 1 # 0 = standard, 1 = integrated stepper handles, 2 = unknown
		toolbarstyle = 0 # 0 = flat, 1 = glassy, 2 = gradient
	}
}

style "dark"
{
	color["fg_color_dark"] = "#dedede"

	GtkWidget::link-color = @fg_color_dark
	GtkWidget::visited-link-color = shade (0.8, @fg_color_dark)

	bg[NORMAL]		= @selected_bg_color
	bg[PRELIGHT]	= shade (1.2, @selected_bg_color)
	bg[ACTIVE]		= shade (0.85, @selected_bg_color)
	bg[SELECTED]	= shade (1.4, @selected_bg_color)
	bg[INSENSITIVE]	= @selected_bg_color

	fg[NORMAL]		= @fg_color_dark
	fg[PRELIGHT]	= @fg_color_dark
	fg[ACTIVE]		= @fg_color_dark
	fg[SELECTED]	= @fg_color_dark
	#fg[INSENSITIVE] = shade (0.65, @fg_color_dark)

	base[NORMAL]	= @fg_color
	base[PRELIGHT]	= shade (1.2, @selected_bg_color)
	base[ACTIVE]	= shade (1.4, @selected_bg_color)
	base[SELECTED]	= @fg_color
	base[INSENSITIVE] = shade (1.2, @selected_bg_color)

	text[NORMAL]	= @fg_color_dark
	text[PRELIGHT]	= @fg_color_dark
	text[ACTIVE]	= @fg_color_dark
	text[SELECTED]	= @fg_color_dark
	#text[INSENSITIVE] = shade (0.65, @fg_color_dark)
}

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

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

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

	engine "murrine"
	{
		gradient_shades	= { 0.95, 0.9, 0.9, 0.85 }
		roundness	= 12
		contrast	= 1.2
		textstyle	= 1
	}
}

style "notebook-bg" {
	bg[NORMAL] = shade (1.02,@bg_color)
	bg[ACTIVE] = shade (0.94, @bg_color)
	bg[PRELIGHT] = shade (1.2, @bg_color)
	fg[ACTIVE] = shade (1.8, @fg_color)
}

style "notebook" = "notebook-bg"
{
	engine "murrine"
	{
		focusstyle = 2
		gradient_shades = { 1.1, 1.0, 1.0, 0.85 }
	}
}

style "tasklist" = "wide"
{
}

style "menu" = "dark"
{
	xthickness = 3
	ythickness = 3
}

style "menubar" = "dark"
{
	fg[PRELIGHT] = "#dedede"
}

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

	fg[PRELIGHT] = @fg_color
	fg[SELECTED] = @fg_color

	text[PRELIGHT] = @text_color
	text[SELECTED] = @text_color
}

style "scale-menu-item" = "dark"
{
	bg[SELECTED] = @fg_color_dark
}

style "separator-menu-item"
{
}

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

style "treeview"
{
	GtkTreeView::odd_row_color	= @bg_color
	GtkTreeView::even_row_color	= @base_color
}

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

	engine "murrine" {
		gradient_shades	= { 1.05, 1.0, 1.0, 0.95 }
		roundness		= 0
		contrast		= 1.2
	}
}

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

style "tooltips"
{
	xthickness = 8
	ythickness = 5

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

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"
	{
		border_colors = { shade (0.90, @bg_color), shade (0.90, @bg_color) }
		contrast = 1.2
		roundness = 12
	}
}

style "statusbar"
{
}

style "entry" = "wider"
{
}

style "comboboxentry"
{
}

style "spinbutton" = "button"
{
}

style "scale"
{
	bg[ACTIVE]	= shade (0.80, @bg_color)
	bg[PRELIGHT]= shade (1.4, @bg_color)

	GtkRange::slider-width = 13

	engine "murrine"
	{
		contrast = 1.2
		gradient_shades	= { 1.05, 1.0, 1.0, 0.95 }
		roundness = 12
	}
}

style "hscale"
{
}

style "vscale"
{
}

style "scrollbar"
{
	bg[NORMAL]		= @selected_bg_color
	bg[SELECTED]	= @selected_bg_color
	bg[INSENSITIVE] = "#000"

	engine "murrine"
	{
		roundness = 12
		contrast	= 1.2
	}
}

style "hscrollbar"
{
}

style "vscrollbar"
{
}

style "iconview" {
	engine "murrine" {
		border_shades = {1.1, 1.0}
		glowstyle	= 5
	}
}

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

	engine "murrine"
	{
		textstyle = 0
	}
}

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

#########################################
# 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 "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 "*<GtkNotebook>"					style "notebook"
widget_class "*<GtkNotebook>*<GtkEventBox>"		style "notebook-bg"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"	style "notebook-bg"
widget_class "*<GtkNotebook>*<GtkLayout>"		style "notebook-bg"
widget_class "*<GtkNotebook>*<GtkViewport>"		style "notebook-bg"
widget_class "*<GtkNotebook>*<GtkScrolledWindow>" style "notebook-bg"
widget_class "*<GtkNotebook>*<GtkLabel>"		style "notebook-bg"

widget_class "*<GtkButton>"						style "button"
widget_class "*<GtkButton>*<GtkLabel>"			style "button"
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 "*<GtkProgress>"					style "progressbar"
widget_class "*<GtkProgressBar>"				style "progressbar"

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

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 "menubar"
widget_class "*<GtkSeparatorMenuItem>*"			style "separator-menu-item"
widget_class "*<GtkMenuItem>.*.<GtkScale>"		style "scale-menu-item"

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

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

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

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

# Styles for certain applications
include "Apps/chromium.rc"
include "Apps/gnome-terminal.rc"
include "Apps/nautilus.rc"
include "Apps/panel.rc"
include "Apps/ubuntuone.rc"
