# Hello world!
# This is nocturne-blue a gtk2 theme file for Gimp only (tested on version 2.8.4), don't expect a working OS theme here!
# though you could modify it to be functional, but that'd be your job, mine is done ;)
# I made intensive use of murrine engine versatility, though I also used mist engine 
# for a reason explained in the combobox style. I'm no expert in gtk theming, I learnt while doing it so 
# there may be some code redundancies or fancy ways of doing things.

# For your help on fune-tuning this theme, thanks to: Caz, K1TesseraEna and GimpChat forum

# feel free to do whatever pleases you with this theme.
# anarkhya - 2013

# Shades of blue used, to help theme recolor
#{0.32, 0.40, 0.75}
#{0.42, 0.52, 1.0}
#{0.40, 0.45, 0.75}
#{0.37, 0.42, 0.95}
#{0.38, 0.43, 0.70}

gtk_color_scheme = "fg_color:#d7d7df"
gtk_color_scheme = "bg_color:#515155"
gtk_color_scheme = "base_color:#67676f"
gtk_color_scheme = "text_color:#e7e7ef"
gtk_color_scheme = "selected_bg_color:#5562a8"
gtk_color_scheme = "selected_fg_color:#ffffff"

	#__________________________
	#  		IMPORTING ICONS 			
	#__________________________
	
style "gimp-icons"
{
# To compensate for low readability on dark background, 

	    stock["gimp-tool-dodge"] =
    {
      { "images/stock-tool-dodge-22.png", *, *, "gtk-button" },
      { "images/stock-tool-dodge-22.png", *, *, *            }
    }
		    stock["gimp-paths"] =
    {
      { "images/stock-paths-22.png", *, *, "gtk-button" },
      { "images/stock-paths-22.png", *, *, *            }
    }
	
}

#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 "default"
{
	# Uncomment these two lines if you want small toolbox buttons and smal icons in notebooks
	#GimpToolPalette::tool-icon-size   	= gtk-dnd
	#GimpDockbook::tab-icon-size       	= small-toolbar
}

style "default"
{
	GtkWidget::link-color 				= "#1ca9bb"
	GtkWidget::visited-link-color 		= "#1ca9bb"
	GtkWidget::focus-padding 		= 0
	GtkWidget::focus-line-width 		= 0
	GtkWidget::interior-focus 			= 25
	GtkWidget::wide-separators 		= 1
	GtkWidget::separator-width 		= 1
	GtkWidget::separator-height 		= 12
	
	GimpDockable::content-border    = 2 # dock window padding
	
	GtkButton::default-border       			= { 0, 0, 0, 0 } 		# left, right, top, bottom
	#GtkButton::default-outside-border	= { 0, 0, 0, 0 }
	#GtkButton ::inner-border					= { 0, 0, 0, 0 }
	GtkButton::child-displacement-x 		= 0
	GtkButton::child-displacement-y 		= 1
	GtkButton::image-spacing  				= 0
	
	GtkComboBox::arrow-size 		= 15
	GtkComboBox::shadow-type 	= none
	
	GtkCheckButton::indicator-size 			= 15
	GtkCheckButton::indicator-spacing		= 2
	GtkRadioButton::indicator-size 			= 15
	GtkRadioButton::indicator-spacing 		= 2
	
	GtkMenuBar::internal-padding     = 0
	GtkMenu::horizontal-padding   	= 0
	GtkMenu::vertical-padding     	= 0
	GtkSeparatorMenuItem::horizontal-padding = 0
	
	GtkTreeView::expander-size        	= 12
	GtkTreeView::expander_spacing  	= 0
	GtkTreeView::horizontal-separator  = 8
	GtkTreeView::vertical-separator   	= 0
	GtkTreeView::odd_row_color 			= shade (0.70,@bg_color) 	# no alternate row color
	GtkExpander::expander-size        	= 12

	GtkScale::slider-length 			= 23 		# default=31
	GtkScale::value-spacing 		= 0 		# default=2
	GtkScale::trough-side-details	= 1		# draws a gauge inside trough
	
	GtkRange::trough-border    = 0
	GtkRange::slider-width       = 15
	GtkRange::stepper-size      = 16
	
	GtkScrollbar::min-slider-length    						= 30
	GtkScrollbar::fixed-slider-length 							= 0
	GtkScrollbar::has-backward-stepper					= 1
	GtkScrollbar::has-forward-stepper						= 1
	GtkScrollbar::has-secondary-backward-stepper		= 0
	GtkScrollbar::has-secondary-forward-stepper		= 0
	
	GtkNotebook::arrow-spacing	= 2
	GtkNotebook::tab-overlap		= 1
	GtkNotebook::tab-curvature	= 1	# doesn't do what it says... ?
	GimpDockbook::tab-border     = 0
	
	GtkPaned::handle-size			= 6
	GtkToolbar::internal-padding	= 0
	
	xthickness = 1
	ythickness = 1

	fg[NORMAL]        = @fg_color
	fg[PRELIGHT]      = @fg_color
	fg[SELECTED]      = @selected_fg_color
	fg[ACTIVE]        = @fg_color
	fg[INSENSITIVE]   = darker (@bg_color)
	
	text[NORMAL]      = @text_color
	text[PRELIGHT]    = @text_color
	text[ACTIVE]      = @selected_fg_color
	text[SELECTED]    = @selected_fg_color
	text[INSENSITIVE] = darker (@bg_color)

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

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

	engine "mist"		# why mist ? go to combobox style to understand..
	{}
}
	#__________________________
	#  			BUTTONS  						
	#__________________________
		
style "button"
{
	xthickness   = 2
	ythickness   = 3
	
	engine "murrine"
	{
		roundness				= 3
		contrast            		= 1.25
		highlight_shade     	= 0.9
		glazestyle 				= 0
		lightborder_shade   = 1.25
		lightborderstyle    	= 0
		border_shades       	= { 1.0, 0.7 }
		gradient_shades    	= {1.05, 0.95, 0.87, 0.75}

	}

	bg[NORMAL]   		=  shade (1.20,@base_color)
	bg[PRELIGHT] 		=  shade (1.30,@base_color)
	bg[ACTIVE]   		=  shade (0.95,@base_color)
	bg[SELECTED]		= shade (0.80,@base_color)
	bg[INSENSITIVE] = shade (1.10,@bg_color)
}

style  "togglebutton"
{}

style  "checkbutton"
{
	xthickness   = 2
	ythickness   = 3
	
	engine "murrine" 
	{
		contrast 				= 1.65
		focusstyle 				= 0
		glazestyle 				= 0
		highlight_shade     	= 1.00
		gradient_shades    	= {1.00, 0.75, 0.75, 0.80}
		lightborderstyle    	= 1
		lightborder_shade   = 1.25
	}
	
	text[NORMAL]    	= shade (1.10,@fg_color)			# checkmark and dot
	text[PRELIGHT] 	= shade (2.10,@fg_color)			# 

	bg[NORMAL]       	= shade (1.20,@base_color)		# box border
	bg[ACTIVE]        	= {0.32, 0.40, 0.75}					# some togglebuttons (eg. active tool in toolbox and gradient direction)
	bg[PRELIGHT]      = shade (1.10,@bg_color)			# some togglebuttons AND some lines prelighted (makes styling difficult)

	bg[SELECTED]	  	= {0.42, 0.52, 1.0}					# box ticked
	base[NORMAL]   	= shade (0.65,@bg_color)			# box unticked
	
	bg[INSENSITIVE]   = shade (0.8,@bg_color)			# some tools
	base[INSENSITIVE]   = "red"
	fg[INSENSITIVE]   = "green"
}

style  "radiobutton" = "checkbutton" 
{}

style "combobox" = "button"
{
# Note: Apparently, not defining any engine for combobox makes it possible to get the 
# "one arrow only" display from the default engine (I used mist engine for performances) 
# as well as the murrine button style I defined in GTKButton).

	xthickness = 5
	ythickness = 5
	
	text[NORMAL]      = shade (1.00,@fg_color)		# arrow AND text
	text[PRELIGHT]    = shade (1.20,@text_color)

	base[NORMAL]     = shade (0.75,@bg_color)		# entry
}

style "combo" {}
style "comboboxentry" {}
style "comboboxtext" {}

style "spinbutton"
{
	xthickness = 3
	ythickness = 4
	
	engine "murrine" 
	{
		contrast					= 1.35
		roundness				= 3
		spinbuttonstyle     	= 1
		arrowstyle = 1
		highlight_shade     	= 1.0
		glazestyle 				= 0
		lightborder_shade   	= 1.6
		lightborderstyle    	= 1
		border_shades       	= { 0.65, 0.65 }
		gradient_shades    	= {1.00, 0.95, 0.90, 0.8}
	}
	
	bg[NORMAL]        	= shade (0.75,@bg_color)		# box arrow

	base[NORMAL]        	= shade (0.75,@bg_color)		# field
	base[SELECTED]	  	= {0.42, 0.52, 1.0}
	base[ACTIVE]			= {0.42, 0.52, 1.0}

	fg[NORMAL]        	= shade (0.80,@fg_color)		# arrow
	fg[PRELIGHT]     		= shade (1.5,@fg_color)

	text[NORMAL]      	= shade (0.9,@fg_color)
}

style "entry" = "spinbutton"
{
	xthickness = 3
	ythickness = 2
	
	engine "murrine" 
	{
		arrowstyle 				= 1
	}
}
style "text-view" = "entry"
{}

style "gimp_spin_scale"
{
# Note: This widget reacts oddly with INSENSITIVE states,
# no matter the engine used.

	xthickness = 5
	ythickness = 1
	
	engine "murrine"
	{
		arrowstyle = 1
	}

	text[NORMAL] 			= shade (0.60,@bg_color)				# contour + text
	text[INSENSITIVE] 	= shade (1.00,@bg_color)
	
	fg[NORMAL] 			= shade (0.2,@bg_color)					# arrow
	fg[PRELIGHT] 			= shade (0.2,@bg_color)
	fg[ACTIVE]      			= shade (0.5,@fg_color)
	fg[SELECTED]      	= shade (0.2,@bg_color)
	fg[INSENSITIVE]   	= shade (1.2,@base_color)				# seems buggy a bit
	bg[INSENSITIVE] 	= shade (1.2,@base_color)				# also seems buggy a bit
	
	bg[NORMAL] 			= shade (1.2,@base_color)				# box arrow

	base[NORMAL]      	= shade (1.2,@base_color)				# trough
	base[SELECTED]    	= shade (1.00,@selected_bg_color)
	base[INSENSITIVE] 	= shade (0.9,@base_color)
	
	bg[SELECTED] 		= {0.40, 0.45, 0.75}						# gauge
}

style "linkbutton"
{
# Note: targets G'MIC plugin and probably more tools

	engine "murrine"
	{
		roundness				= 3
		lightborderstyle    	= 1
		lightborder_shade   	= 1.5
		contrast 				= 1.5
		gradient_shades    	= { 1.1, 1.0, 1.0, 0.9 }
		highlight_shade     	= 1.00
		glazestyle 				= 0
	}
	
	bg[PRELIGHT]      = shade (0.9, @base_color)
	bg[ACTIVE]        = shade (0.90, @bg_color)
}

	#__________________________
	#  TOP MENU WITH JUMPLISTS  		
	#__________________________

style "menubar"
{
	engine "murrine" 
	{
		roundness = 3
		highlight_shade     	= 1.0
		lightborder_shade   	= 1.0
		lightborderstyle    	= 0
		gradient_shades    	= {1.00, 0.95, 0.90, 0.7}
		focusstyle 				= 0
	}
	
	fg[NORMAL] 	=  	shade (1.00, @fg_color)
	bg[SELECTED] =  	{0.40, 0.45, 0.75}
	bg[NORMAL] 	=  	@bg_color
}

style "menu"
{
# Note: not 100% satisfying (see text[NORMAL] limitations) 
# but I didn't want to call for a third engine to finetune 
# only for this one, using clearlooks here would have solved 
# limitations but at the price of (possible) slowdown.

	xthickness = 3
	ythickness = 8
	
	engine "murrine"
	{
		roundness				= 3
		lightborderstyle    	= 1
		lightborder_shade   	= 1.5
		contrast 				= 1.5
		gradient_shades    	= { 1.1, 1.0, 1.0, 0.9 }
		highlight_shade     	= 1.00
		glazestyle 				= 0
		arrowstyle 				= 1
		menustyle           	= 1
	}
		
	bg[NORMAL] 			= 	shade (0.70, @bg_color)
	bg[SELECTED] 		=  shade (0.9, @base_color)	# vertical stripe AND mouse hover
	text[NORMAL]			= 	shade (1.00, @fg_color)	# combobox text jumplist AND checkmarks AND radios (= painful to edit)
	fg[NORMAL]        	= 	shade (1.00, @fg_color)	# text jumplist
	fg[INSENSITIVE]		= 	shade (1.20, @bg_color)

	text[PRELIGHT]    = shade (2.00, @fg_color)
	bg[PRELIGHT] 		= shade (2.00, @fg_color)			# arrow
}

style "menu-item"
{
	xthickness = 2
	ythickness = 3

	fg[PRELIGHT] = @selected_fg_color 	# top menu text
}

style "separator" 
{

}

style "separator-menu-item"
{
	xthickness = 2
	ythickness = 0
}

	#__________________________
	#  			NOTEBOOKS					
	#__________________________
	
style "notebook-bg"
{
	bg[NORMAL] 			= shade (1.0,@bg_color)	# box focus
	bg[ACTIVE]        		= shade (0.75,@bg_color)	# box out of focus

	fg[NORMAL]        	= shade (1.00,@fg_color)	# arrow
	fg[PRELIGHT]      	= shade (2.00,@fg_color)
	fg[INSENSITIVE]   	= shade (1.00,@bg_color)
}

style "notebook" = "notebook-bg"
{
	xthickness = 2
	ythickness = 2
	
	engine "murrine"
	{
		roundness 				= 3
		arrowstyle 				= 1
		gradient_shades    	= {1.5,1.5,0.1,0.1}
		contrast            		= 1.15
		lightborder_shade   	= 1.35
	}
}

	#__________________________
	#  		SCROLLBARS						
	#__________________________

style "range" 
{
}

style "scrollbar"
{
	engine "murrine"
	{
		roundness 				= 2
		contrast            		= 1.35
		arrowstyle 				= 1
		highlight_shade     	= 1.0
		glazestyle 				= 0
		lightborder_shade   	= 1.3
		lightborderstyle    	= 0
		stepperstyle        	= 0
		border_shades       	= { 1.0, 1.0 }
		trough_shades			= { 0.80, 0.90 }
		scrollbarstyle 			= 2
		gradient_shades    	= {1.10, 1.00, 1.00, 1.00}
	}
}

style "hscrollbar"
{
	fg[NORMAL]        	= shade (1.00,@fg_color)	# arrow
	fg[PRELIGHT]      	= shade (1.30,@fg_color)	# 
	fg[ACTIVE]        		= shade (1.00,@fg_color)	#
	fg[INSENSITIVE]      = shade (1.05,@bg_color)	# 
	
	bg[NORMAL]        	= shade (1.10,@bg_color)	# box arrow
	bg[PRELIGHT]      	= shade (1.25,@bg_color)	#
	bg[ACTIVE]				= shade (1.00,@bg_color)	#
	bg[INSENSITIVE]		= shade (1.10,@bg_color)	#
	
	bg[SELECTED]        	= shade (1.10,@bg_color)	# slider
}

	#__________________________
	#  			SLIDERS							
	#__________________________

style "scale"
{

	
	engine "murrine"
	{
		roundness 				= 3
		contrast            		= 1.75
		highlight_shade     	= 1.0
		glazestyle 				= 0
		lightborder_shade   	= 1.0
		lightborderstyle    	= 0
		sliderstyle        		= 1
		border_shades       	= { 0.65, 0.50 }
		trough_shades			= { 0.6, 1.0 }
		gradient_shades    	= {1.15, 0.95, 0.90, 0.90}
		focusstyle 				= 0
	}
}

style "hscale"
{
	xthickness = 3
	ythickness = 3
	
	bg[NORMAL]        = shade (0.90,@base_color)		# slider
	bg[PRELIGHT]      = shade (1.05,@base_color)		# slider hover AND pressed
	bg[SELECTED]	  	= {0.37, 0.42, 0.95}					# gauge
}

	#__________________________
	#  			LABELS							
	#__________________________

# Note: hard to define a contrast scheme properly as gimp UI uses bold font
# for checkbuttons to enforce the fact that the widget has child element)

style "label"
{
	fg[NORMAL] = shade (0.95,@fg_color)
}

style "frametitlelabel"
{
	fg[NORMAL] = shade (1.1,@fg_color)
}

style "buttonlabel"
{
	fg[NORMAL] = shade (1.05,@fg_color)
}

style "togglebuttonlabel"
{
	fg[NORMAL] = shade (0.85,@fg_color)
}

	#__________________________
	#  			TREEVIEW						
	#__________________________
	
style "treeview"
{
	xthickness = 0
	ythickness = 2
	
	engine "murrine"
	{
		highlight_shade     	= 1.0
		lightborder_shade   	= 1.0
		lightborderstyle    	= 0
		gradient_shades    	= {1.00, 0.95, 0.90, 0.7}
		focusstyle 				= 0
		listviewheaderstyle 	= 1
		listviewstyle       		= 0
		expanderstyle 			= 0
		cellstyle 				= 1
		arrowstyle				= 1
	}
	
	base[NORMAL]        = shade (0.70, @bg_color)
	bg[PRELIGHT]        = shade (1.00, @base_color)
	fg[PRELIGHT]        = shade (2.00, @fg_color)
	fg[NORMAL]        = shade (1.10, @fg_color)
	text[NORMAL]      = shade (0.90, @fg_color)
	text[ACTIVE]      = shade (1.08, @fg_color)
	text[SELECTED]    = shade (1.08, @fg_color)	
	base[ACTIVE]        = {0.38, 0.43, 0.70}	
}

style "treeview-header"
{
	xthickness = 4
	ythickness = 3
	
	font_name  = "Bold" 			# doesn't want to work, I don't know why.
	
	engine "murrine"
	{
		contrast            		= 0.8
		highlight_shade     	= 1.025
		lightborder_shade   	= 1.0
		lightborderstyle    	= 0
		gradient_shades    	= {1.10, 1.10, 1.10, 0.95}
		focusstyle 				= 0
		cellstyle 				= 1
	}
	
	bg[NORMAL]        = shade (1.1, @bg_color)
}
#______________________________________

style "tooltips"
{
	xthickness = 8
	ythickness = 8
	
	engine "murrine"
	{
		contrast            		= 1.0
		highlight_shade     	= 1.0
		glazestyle 				= 0
		lightborder_shade   	= 2.0
		lightborderstyle    	= 1
	}
	fg[NORMAL]	= shade (1.30, @fg_color)
	bg[NORMAL]	= { 0.10, 0.42, 0.46 }
}

style "expander"
{
	engine "murrine"
	{
		arrowstyle = 1
	}

	text[NORMAL]      = shade (1.00, @fg_color)
	text[PRELIGHT]    = shade (2.00, @fg_color)
}

style "progressbar"
{
	xthickness = 1
	ythickness = 1

		engine "murrine"
	{
		contrast 				= 1.5
		progressbarstyle      = 2
		highlight_shade     	= 0.95
		gradient_shades    	= {1.30, 1.0, 0.8, 1.30}
		glowstyle           		= 3
		glow_shade          	= 0.75
	}
	
	fg[PRELIGHT] = @selected_fg_color
}

style "frame" 
{
}

style "statusbar" 
{
}


	#__________________________
	#  			CLASSES						
	#__________________________

# default style is applied to every widget

class "GtkWidget"    style "default" 
class "GtkRange"     style "range"
class "GtkFrame"     style "frame"
class "GtkSeparator" style "separator"

class "GtkLabel"     style "label"

class "GtkEntry"     style "entry"

class "GimpSpinScale" style "gimp_spin_scale"

class "GtkSpinButton"  style "spinbutton"

class "GtkScale"       style "scale"
class "GtkHScale"      style "hscale"
class "GtkVScale"      style "hscale"

class "GtkScrollbar"   style "scrollbar"
class "GtkHScrollbar"  style "hscrollbar"
class "GtkVScrollbar"  style "hscrollbar"

class "GtkExpander"  style "expander"

class "GtkWidget" style "gimp-icons"

	#__________________________
	#  	CLASSES HIERARCHY				
	#__________________________

# _____________! ORDER MATTERS !______________
# ______the right styles override each other________

widget_class "*.<GtkFrame>.<GtkLabel>" 			style "frametitlelabel"
widget_class "*<GtkButton>*<GtkLabel>"    			style "buttonlabel"
widget_class "*<GtkToggleButton>*<GtkLabel>"    style "togglebuttonlabel"

widget_class "*<GtkNotebook>*<GtkEventBox>"     style "notebook-bg"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"  style "notebook-bg"
widget_class "*<GtkNotebook>*<GtkLayout>"       style "notebook-bg"

widget_class "*<GtkButton>"      style "button"

widget_class "*<GtkCheckButton>" style  "checkbutton"
widget_class "*<GtkRadioButton>" style  "radiobutton"
widget_class "*<GtkToggleButton>" style  "togglebutton"

widget_class "*<GtkNotebook>"    style "notebook"
widget_class "*<GtkStatusbar>*"  style "statusbar"

widget_class "*<GtkComboBox>*"         style "combobox"
widget_class "*<GtkComboBoxEntry>*" style "comboboxentry"
widget_class "*<GtkComboBoxText>*"         style "comboboxtext"
widget_class "*<GtkCombo>*"         style "combo"

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

widget_class "*.<GtkTreeView>*"        style "treeview"

widget_class "*<GtkProgressBar>"       style "progressbar"

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

widget "gtk-tooltip*" style "tooltips"

widget_class "*<GtkTextView>"      style "text-view"

widget_class "*<GtkLinkButton>"      style "linkbutton"





