<?xml version="1.0"?>
<metacity_theme>
<info>
<name>Sloth</name>
<author>Graeme Worthy</author>
<copyright>Graeme Worthy, 2003</copyright>
<date>July, 2003</date> 
<description>Nothing too flashy.
An icy clean theme.</description>
</info>
<!-- 	
	any comments or questions to:
	graeme@renf.org
	
thanks to Havoc Pennington for the tutorial, 

	Copyright (C) 2003  Graeme Worthy

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-->

<!--

	SECTION 1
	
	FRAME GEOMETRY: 
	
	This is rather simple: 
	These are the values for the outside of your window
	Small changes here can be made for tweaking your 
	window borders and the like
	the rounded edges can be turned on and off like faucets,
	for some reason, however they only show up on shaded windows
	i don't claim to understand
	set rounded_top_left="false" or delete it, rounding is false by default

	The handles on the borders my be a bit too tiny for your tastes, 
	I sometimes upthe left_width, right_width, and bottom_height 
	values to make the edges more grabable.
	keep 'em above 0 though, lest those thin lines dissappear completely.
-->

	<frame_geometry name="normal_geometry" 
	rounded_top_left="true" 
	rounded_top_right="true"
	>
	<distance name="left_width" value="2"/>
	<distance name="right_width" value="2"/>
	<distance name="bottom_height" value="2"/>
	<distance name="left_titlebar_edge" value="6"/>
	<distance name="right_titlebar_edge" value="6"/>
	<distance name="button_width" value="17"/>
	<distance name="button_height" value="17"/>
	<distance name="title_vertical_pad" value="4"/>
	<border name="title_border" left="3" right="12" top="0" bottom="3"/>
	<border name="button_border" left="0" right="0" top="1" bottom="1"/>
	</frame_geometry>

<!--

	SECTION 2 
	
	DRAW OPS:
	
	these can be very complex, but i've just used the simple examples
	each one of these draws a shape, that i've conveniently named
	unfortunately it doesn't actually do dashed lines,

-->

<!--
	RECTANGLE
	this is really simple, 
	it draws a rectangle to make a border exactly the dimensions of a region
	i like to keep the colour at #666666 because it's less harsh.
-->

	<draw_ops name="rectangle">
	<rectangle 
	x="0"
	y="0"
	width="width-1"
	height="height-1"
	color="#666666"
	/>
        <!-- ** BLACK outlines around the round corners ** -->
	<!-- top left -->
	<line color="#666666" x1="1" y1="3" x2="1" y2="4"/>
 	<line color="#666666" x1="2" y1="2" x2="2" y2="2"/>
	<line color="#666666" x1="3" y1="1" x2="4" y2="1"/>

	<!-- top right -->
	<line color="#666666" x1="width-2" y1="3" x2="width-2" y2="4"/>
	<line color="#666666" x1="width-3" y1="2" x2="width-3" y2="2"/>
	<line color="#666666" x1="width-4" y1="1" x2="width-5" y2="1"/>

	</draw_ops>
	
<!-- 
	TINT 2
	this tint is for unfocused windows, some people like it lighter but for now its darker
	and its really transparent right now, 
	the alpha value can be anywere from 0 : so transparent as to be invisible
					to  1 : so opaque that it blocks out the sun
-->

<draw_ops name="tint2">	
	<tint 
	color="#e0e0e0" 
	alpha="0.3"
	x="0" 
	y="0" 
	width="width" 
	height="height"/>
</draw_ops>

<!-- 
	TINT
	this tint is for focused windows, 
	i'm really fond of #ddeeff as a colour, but anything from #ddffee, to #eeffdd 
	can be pretty dope. try to keep the tint for tint2 the same, but dark... 
	ie: #335577 for ddeeff, 
		33 for dd,
		55 for ee, 
		77 for ff, why not 66? it just looks better that way.
-->

<draw_ops name="tint">	
	<tint 
	color="#404040" 
	alpha="0.2" 
	x="0" 
	y="0" 
	width="width" 
	height="height"/>
</draw_ops>

<!-- 
	ICON 
	i shrunk the program icon.. 
	if you want it back the size it was, tough 
-->

	<draw_ops name="icon">
	<icon 
	x="2" 
	y="2" 
	width="14" 
	height="14" 
	alpha="1"/>
	</draw_ops>

<!-- 
	TITLE
	my little math-hack for a centered window-title
	i have the distinct feeling that 'max' is actually 'min'
	go bug a developer.
-->

	<draw_ops name="title">
	<title 
	x="((width-title_width)/2) `max` 40" 
	y="(height/2)-5"
	color="#ffffff"/>
	</draw_ops>

	<draw_ops name="title_unfocused">
	<title 
	x="((width-title_width)/2) `max` 40" 
	y="(height/2)-5"
	color="#808080"/>
	</draw_ops>

	<draw_ops name="icon_solid">
	<icon 
	x="0" 
	y="0" 
	width="mini_icon_width"
	height="height+1" 
	alpha="1"/>
	</draw_ops>

<!-- 
	BACKGROUNDS
	background2 uses tint2 
	i've used it for unfocused windows
	background1 uses tint
	i've used it for focused windows

-->


	<draw_ops name="background2">
	<include name="rectangle"/>
	<include name="tint2"/>
	</draw_ops>

	<draw_ops name="background1">
	<include name="rectangle"/>
	<include name="tint"/>
	</draw_ops>


<!--
	PNG's
	yes, i used images instead of drawing it all with xml
	my the gods forgive me
-->

	<draw_ops name="window_shape">
	<image 
	filename="frame.png" 
	x="0" 
	y="height/2" 
	width="width/2" 
	height="height/2" 
	alpha="0.6" 
	colorize="#ff3333"
	/>

	<image 
	filename="frame.png" 
	x="3" 
	y="(height/2)-5" 
	width="width-5" 
	height="height/1.5" 
	alpha="0.6" 
	colorize="#ff3333"
	/>

	</draw_ops>

	<draw_ops name="window_shape_down">
	<image 
	filename="frame.png" 
	x="0" 
	y="height/2" 
	width="width/2" 
	height="height/2" 
	alpha="0.9" 
	colorize="#ff3333"
	/>

	<image 
	filename="frame.png" 
	x="3" 
	y="(height/2)-5" 
	width="width-5" 
	height="height/1.5" 
	alpha="0.9" 
	colorize="#ff3333"
	/>

	</draw_ops>


	<draw_ops name="window_shape_max">
	<image 
	filename="frame.png" 
	x="3" 
	y="(height/2)-5" 
	width="width-5" 
	height="height/1.5" 
	alpha="0.6" 
	colorize="#ff3333"
	/>

	<image 
	filename="frame.png" 
	x="0" 
	y="height/2" 
	width="width/2" 
	height="height/2" 
	alpha="0.6" 
	colorize="#ff3333"
	/>
	</draw_ops>

	<draw_ops name="window_shape_max_down">
	<image 
	filename="frame.png" 
	x="3" 
	y="(height/2)-5" 
	width="width-5" 
	height="height/1.5" 
	alpha="0.7" 
	colorize="#ff3333"
	/>

	<image 
	filename="frame.png" 
	x="0" 
	y="height/2" 
	width="width/2" 
	height="height/2" 
	alpha="1" 
	colorize="#ff3333"
	/>

	</draw_ops>

	<draw_ops name="shutdown">
	<image 
	filename="ex.png"
	x="5" 
	y="5" 
	width="8" 
	height="8" 
	alpha="0.5" 
	/>
	</draw_ops>

	<draw_ops name="shutdown_down">
	<image 
	filename="ex.png"
	x="5" 
	y="5" 
	width="8" 
	height="8" 
	alpha="0.9" 
	/>
	</draw_ops>

	<draw_ops name="down">
	<image 
	filename="double.png"
	x="2" 
	y="4" 
	width="10" 
	height="10" 
	alpha="0.5" 
	/>
	</draw_ops>

	<draw_ops name="down_down">
	<image 
	filename="double.png"
	x="2" 
	y="4" 
	width="10" 
	height="10" 
	alpha="0.9" 
	/>
	</draw_ops>

	<draw_ops name="plus">
	<image 
	filename="plus.png"
	x="5" 
	y="5" 
	width="8" 
	height="8" 
	alpha="0.6" 
	/>
	</draw_ops>


	<draw_ops name="plus_down">
	<image 
	filename="plus.png"
	x="5" 
	y="5" 
	width="8" 
	height="8" 
	alpha="0.9" 
	/>
	</draw_ops>

	<draw_ops name="minus">
	<image 
	filename="minus.png"
	x="5" 
	y="5" 
	width="8" 
	height="8" 
	alpha="0.6" 
	/>
	</draw_ops>


	<draw_ops name="minus_down">
	<image 
	filename="minus.png"
	x="5" 
	y="5" 
	width="8" 
	height="8" 
	alpha="0.9" 
	/>
	</draw_ops>

	<!-- frame styles 

	i'm really not sure how these work, 
	but i think it's just putting all the elements together

	i had to create versions for all the intersections of
	focused, shaded, and maximised. lame.

	-->


	<frame_style 
	name="normal" 
	geometry="normal_geometry">


	<button function="close" state="normal" draw_ops="shutdown"/>
	<button function="close" state="prelight" draw_ops="shutdown_down"/>
	<button function="close" state="pressed" draw_ops="shutdown_down"/>

	<button function="maximize" state="normal" draw_ops="window_shape"/>
	<button function="maximize" state="prelight" draw_ops="window_shape_down"/>
	<button function="maximize" state="pressed" draw_ops="window_shape_down"/>

	<button function="minimize" state="normal" draw_ops="down"/>
	<button function="minimize" state="prelight" draw_ops="down_down"/>
	<button function="minimize" state="pressed" draw_ops="down_down"/>

	<button function="menu" state="normal" draw_ops="icon"/>
	<button function="menu" state="pressed" draw_ops="icon_solid"/>

	<!-- 

	PIECE POSITIONS:
	This is an important subset of frame_style

	The options are:

	entire_background, which is just for the body

	left_edge
	right_edge
	bottom_edge

	bottom_titlebar_edge
	top_titlebar_edge
	left_titlebar_edge
	right_titlebar_edge

	titlebar	
	titlebar_middle

	title

	and follows the format:
	<piece position="entire_background" draw_ops="my_drawing_operation"/>

	-->  

	<piece position="title" draw_ops="title"/>
	<piece position="titlebar" draw_ops="background1"/>
	<piece position="entire_background" draw_ops="rectangle"/>

	</frame_style>

	<frame_style 
	name="normal_focused" 
	parent="normal" 
	geometry="normal_geometry">
	<!-- overrides of parent style go here -->
	</frame_style>


	<frame_style 
	name="normal_unfocused" 
	parent="normal" 
	geometry="normal_geometry">

	<piece position="title" draw_ops="title_unfocused"/>
	<piece position="titlebar" draw_ops="background2"/>

	<!-- overrides of parent style go here -->
	</frame_style>

	<frame_style 
	name="maximized_focused" 
	parent="normal" 
	geometry="normal_geometry">
	<!-- overrides of parent style go here -->

	<button function="maximize" state="normal" draw_ops="window_shape_max"/>
	<button function="maximize" state="prelight" draw_ops="window_shape_max_down"/>
	<button function="maximize" state="pressed" draw_ops="window_shape_max_down"/>


	</frame_style>

	<frame_style 
	name="maximized_unfocused" 
	parent="maximized_focused" 
	geometry="normal_geometry">

	<!-- overrides of parent style go here -->
	</frame_style>

	<frame_style 
	name="shaded_focused" 
	parent="normal" 
	geometry="normal_geometry">
	<!-- overrides of parent style go here -->
	</frame_style>


	<frame_style 
	name="shaded_unfocused" 
	parent="normal_unfocused" 
	geometry="normal_geometry">
	<!-- overrides of parent style go here -->
	</frame_style>

	<frame_style 
	name="maximized_shaded_focused" 
	parent="normal" 
	geometry="normal_geometry">
	<!-- overrides of parent style go here -->
	</frame_style>

	<frame_style 
	name="maximized_shaded_unfocused" 
	parent="normal_unfocused" 
	geometry="normal_geometry">
	<!-- overrides of parent style go here -->
	</frame_style>

	<!-- 

	FRAME STYLE SET
	These seem kind of redundant at first... heck, even later 
	They point to the above frame styles, which i've pragmatically named so 
	as to create no confusion

	-->

	<frame_style_set name="style_set">
	<frame focus="yes" state="normal" resize="both" style="normal_focused"/>
	<frame focus="no" state="normal" resize="both" style="normal_unfocused"/>
	<frame focus="yes" state="maximized" style="maximized_focused"/>
	<frame focus="no" state="maximized" style="maximized_unfocused"/>
	<frame focus="yes" state="shaded" style="shaded_focused"/>
	<frame focus="no" state="shaded" style="shaded_unfocused"/>
	<frame focus="yes" state="maximized_and_shaded" style="maximized_shaded_focused"/>
	<frame focus="no" state="maximized_and_shaded" style="maximized_shaded_unfocused"/>
	</frame_style_set>

	<!--

	WINDOWS
	The final mapping that you must provide is 
	to map the 'window types' to given 'frame style sets'. 
	Each window type needs a style set - 
	normal, dialog, modal_dialog, menu, utility and border 

	-->
	<window type="normal" style_set="style_set"/>
	<window type="dialog" style_set="style_set"/>
	<window type="modal_dialog" style_set="style_set"/>
	<window type="menu" style_set="style_set"/>
	<window type="utility" style_set="style_set"/>
	<window type="border" style_set="style_set"/>

	<!-- 

	MENU ICONS


	-->
	<menu_icon function="close" state="NORMAL" draw_ops="tint"/>
	<menu_icon function="maximize" state="NORMAL" draw_ops="tint"/>
	<menu_icon function="minimize" state="NORMAL" draw_ops="tint"/>
	<menu_icon function="unmaximize" state="NORMAL" draw_ops="tint"/>


	</metacity_theme>
