<?xml version="1.0"?>

<metacity_theme>

<info>
	<name>Equinox Evolution Rounded</name>
	<author>Matthieu James</author>
	<copyright>GPL</copyright>
	<date>Aou 30, 2010</date>
	<description>A new metacity theme designed to fit Equinox engine and Faenza icon theme.</description>
</info>

<!-- ####################################################################################################################
     General window layout (geometric stuff)
     #################################################################################################################### -->
     
<frame_geometry name="frame_geometry_normal" title_scale="medium" rounded_top_left="true" rounded_top_right="true" rounded_bottom_left="false" rounded_bottom_right="false">
    <distance name="left_width" value="1"/>
    <distance name="right_width" value="1"/>
    <distance name="bottom_height" value="1"/>
    <distance name="left_titlebar_edge" value="8"/>
    <distance name="right_titlebar_edge" value="8"/>
    <distance name="button_width" value="18"/>
    <distance name="button_height" value="18"/>
    <distance name="title_vertical_pad" value="0"/>
    <border name="title_border" left="14" right="14" top="4" bottom="4"/>
    <border name="button_border" left="0" right="0" top="3" bottom="0"/>
</frame_geometry>

<frame_geometry name="frame_geometry_maximized" title_scale="medium" rounded_top_left="false" rounded_top_right="false" rounded_bottom_left="false" rounded_bottom_right="false">
    <distance name="left_width" value="0"/>
    <distance name="right_width" value="0"/>
    <distance name="bottom_height" value="6"/>
    <distance name="left_titlebar_edge" value="8"/>
    <distance name="right_titlebar_edge" value="8"/>
    <distance name="button_width" value="18"/>
    <distance name="button_height" value="18"/>
    <distance name="title_vertical_pad" value="0"/>
    <border name="title_border" left="14" right="14" top="4" bottom="4"/>
    <border name="button_border" left="0" right="0" top="3" bottom="0"/>
</frame_geometry>



<!-- ####################################################################################################################
     Window Title
     #################################################################################################################### -->

<draw_ops name="draw_title_text_normal">
    <title color="shade/gtk:bg[NORMAL]/1.1" x="(3 `max` (width-title_width)) / 2 +1" y="(((height - title_height) / 2) `max` 0) + 1"/>
    <title color="gtk:fg[NORMAL]" x="(3 `max` (width-title_width)) / 2 + 0"	y="(((height - title_height) / 2) `max` 0)"/>
</draw_ops>

<draw_ops name="draw_title_text_inactive">
    <title color="shade/gtk:bg[NORMAL]/1.1" x="(3 `max` (width-title_width)) / 2 + 1" y="(((height - title_height) / 2) `max` 0) + 1"/>
	<title color="shade/gtk:bg[NORMAL]/0.75" x="(3 `max` (width-title_width)) / 2 + 0" y="(((height - title_height) / 2) `max` 0)"/>
</draw_ops>


<!-- ####################################################################################################################
     Construct titlebar from rectangles instead so we can pick up the GTK theme
     #################################################################################################################### -->

<draw_ops name="title_wo_highlight_corners">
    <!-- Background gradient -->
    <gradient type="vertical" x="1" y="1" width="width - 2" height="height - 1">
        <color value="shade/gtk:bg[NORMAL]/1.075" />
        <color value="shade/gtk:bg[NORMAL]/1" />
    </gradient>

    <!-- Topmost border -->
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="0" x2="width" y1="0" y2="0"/>

    <!-- Top highlight -->
    <tint color="#ffffff" alpha="0.35" x="6" y="1" width="width - 12" height="1"/>
    <tint color="#ffffff" alpha="0.15" x="5" y="1" width="1" height="1"/>
    <tint color="#ffffff" alpha="0.15" x="width" y="1" width="1" height="1"/>
    <tint color="#ffffff" alpha="0.10" x="5" y="2" width="width - 10" height="1"/>

    <!-- Upper-left highlight -->
    <!-- Draw each pixel one by one. Again, using <tint> for alpha support. -->
    <tint color="#ffffff" alpha="0.30" x="3" y="2"  width="2" height="1"/>
    <tint color="#ffffff" alpha="0.27" x="2" y="3"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.24" x="2" y="4"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.21" x="1" y="5"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.18" x="1" y="6"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.15" x="1" y="7"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.12" x="1" y="8"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.09" x="1" y="9"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.06" x="1" y="10" width="1" height="1"/>
    <tint color="#ffffff" alpha="0.03" x="1" y="11" width="1" height="1"/>

    <!-- Upper-right highlight -->
    <!-- Same as above. -->
    <tint color="#ffffff" alpha="0.30" x="width - 5" y="2"  width="2" height="1"/>
    <tint color="#ffffff" alpha="0.27" x="width - 3" y="3"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.24" x="width - 3" y="4"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.21" x="width - 2" y="5"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.18" x="width - 2" y="6"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.15" x="width - 2" y="7"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.12" x="width - 2" y="8"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.09" x="width - 2" y="9"  width="1" height="1"/>
    <tint color="#ffffff" alpha="0.06" x="width - 2" y="10" width="1" height="1"/>
    <tint color="#ffffff" alpha="0.03" x="width - 2" y="11" width="1" height="1"/>
</draw_ops>

<draw_ops name="draw_title">
	<include name="title_wo_highlight_corners" x="0" y="0" width="width" height="height" />
	
    <!-- Left border -->
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="0" x2="4" y1="1" y2="1"/>
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="0" x2="2" y1="2" y2="2"/>
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="0" x2="1" y1="3" y2="3"/>
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="0" x2="1" y1="4" y2="4"/>
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="0" x2="0" y1="5" y2="90"/>

	<!-- Right border -->
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="width-1" x2="width-5" y1="1" y2="1"/>
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="width-1" x2="width-3" y1="2" y2="2"/>
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="width-1" x2="width-2" y1="3" y2="3"/>
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="width-1" x2="width-2" y1="4" y2="4"/>
    <line color="shade/gtk:bg[NORMAL]/0.6" x1="width-1" x2="width-1" y1="5" y2="90"/>
</draw_ops>

<draw_ops name="draw_title_maximized">
    <!-- Background gradient -->
    <gradient type="vertical" x="0" y="0" width="width+9" height="height">
        <color value="shade/gtk:bg[NORMAL]/1.075" />
        <color value="shade/gtk:bg[NORMAL]/1" />
    </gradient>

    <!-- Topmost dark line -->
    <line color="shade/gtk:bg[NORMAL]/0.65" x1="0" x2="width" y1="0" y2="0"/>

    <!-- Top highlight -->
    <!-- This uses <tint> (which supports alpha) instead of <line> (which doesn't) -->
    <tint color="#ffffff" alpha="0.35" x="0" y="1" width="width" height="1"/>
    <tint color="#ffffff" alpha="0.10" x="0" y="2" width="width" height="1"/>
</draw_ops>


<!-- ####################################################################################################################
     The frame around windows
     #################################################################################################################### -->

<draw_ops name="left_edge"><line color="shade/gtk:bg[NORMAL]/0.6" x1="0" x2="0" y1="0" y2="height" /></draw_ops>

<draw_ops name="right_edge"><line color="shade/gtk:bg[NORMAL]/0.6" x1="width - 1" x2="width - 1" y1="0" y2="height" /></draw_ops>

<draw_ops name="bottom_edge">
	<line color="shade/gtk:bg[NORMAL]/0.6" x1="0" x2="width" y1="height - 1" y2="height - 1" />
</draw_ops>
<draw_ops name="bottom_edge_maximized">
	<tint color="gtk:bg[NORMAL]" alpha="1.0" x="0" y="0" width="width" height="height"/>
</draw_ops>


<!-- ####################################################################################################################
     Buttons
     #################################################################################################################### -->

<!-- Active window - close button -->
<draw_ops name="button_close_normal">
	<image filename="button_normal.png" x="0" y="0" width="width" height="height"/>
	<image filename="close.png" x="5" y="5" width="8" height="8"/>
</draw_ops>
<draw_ops name="button_close_prelight">
	<image filename="button_prelight.png" x="0" y="0" width="width" height="height"/>
	<image filename="close.png" x="5" y="5" width="8" height="8"/>
</draw_ops>
<draw_ops name="button_close_pressed">
	<image filename="button_pressed.png" x="0" y="0" width="width" height="height"/>
	<image filename="close.png" x="5" y="5" width="8" height="8"/>
</draw_ops>

<!-- Active window - maximize button-->
<draw_ops name="button_max_normal">
	<image filename="button_normal.png" x="0" y="0" width="width" height="height"/>
	<image filename="max.png" x="5" y="5" width="8" height="8"/>
</draw_ops>
<draw_ops name="button_max_prelight">
	<image filename="button_prelight.png" x="0" y="0" width="width" height="height"/>
	<image filename="max.png" x="5" y="5" width="8" height="8"/>
</draw_ops>
<draw_ops name="button_max_pressed">
	<image filename="button_pressed.png" x="0" y="0" width="width" height="height"/>
	<image filename="max.png" x="5" y="5" width="8" height="8"/>
</draw_ops>

<!-- Active window - minimize button-->
<draw_ops name="button_min_normal">
	<image filename="button_normal.png" x="0" y="0" width="width" height="height"/>
	<image filename="min.png" x="5" y="5" width="8" height="8"/>
</draw_ops>
<draw_ops name="button_min_prelight">
	<image filename="button_prelight.png" x="0" y="0" width="width" height="height"/>
	<image filename="min.png" x="5" y="5" width="8" height="8"/>
</draw_ops>
<draw_ops name="button_min_pressed">
	<image filename="button_pressed.png" x="0" y="0" width="width" height="height"/>
	<image filename="min.png" x="5" y="5" width="8" height="8"/>
</draw_ops>

<!-- Active window - menu button -->
<draw_ops name="button_menu_normal">
	<image filename="button_normal.png" x="0" y="0" width="width" height="height"/>
	<image filename="menu.png" x="5" y="5" width="8" height="8"/>
</draw_ops>
<draw_ops name="button_menu_prelight">
	<image filename="button_prelight.png" x="0" y="0" width="width" height="height"/>
	<image filename="menu.png" x="5" y="5" width="8" height="8"/>
</draw_ops>
<draw_ops name="button_menu_pressed">
	<image filename="button_pressed.png" x="0" y="0" width="width" height="height"/>
	<image filename="menu.png" x="5" y="5" width="8" height="8"/>
</draw_ops>

<!-- Inactive window - close button -->
<draw_ops name="button_close_inactive">
	<image filename="button_inactive.png" x="0" y="0" width="width" height="height"/>
	<image filename="close_inactive.png" x="5" y="5" width="8" height="8"/>
</draw_ops>

<!-- Inactive window - maximize button-->
<draw_ops name="button_max_inactive">
	<image filename="button_inactive.png" x="0" y="0" width="width" height="height"/>
	<image filename="max_inactive.png" x="5" y="5" width="8" height="8"/>
</draw_ops>

<!-- Inactive window - minimize button-->
<draw_ops name="button_min_inactive">
	<image filename="button_inactive.png" x="0" y="0" width="width" height="height"/>
	<image filename="min_inactive.png" x="5" y="5" width="8" height="8"/>
</draw_ops>

<!-- Inactive window - menu button -->
<draw_ops name="button_menu_inactive">
	<image filename="button_inactive.png" x="0" y="0" width="width" height="height"/>
	<image filename="menu_inactive.png" x="5" y="5" width="8" height="8"/>
</draw_ops>


<!-- ####################################################################################################################
     Frame styles
     #################################################################################################################### -->

<!-- normal -->
<frame_style name="frame_style_normal_focused" geometry="frame_geometry_normal">
	<piece position="title" draw_ops="draw_title_text_normal"/>
	<piece position="titlebar" draw_ops="draw_title"/>
	<piece position="left_edge" draw_ops="left_edge"/>
	<piece position="right_edge" draw_ops="right_edge"/>
	<piece position="bottom_edge" draw_ops="bottom_edge"/>
	<button function="close" state="normal" draw_ops="button_close_normal"/>
	<button function="close" state="prelight" draw_ops="button_close_prelight"/>
	<button function="close" state="pressed" draw_ops="button_close_pressed"/>
	<button function="minimize" state="normal" draw_ops="button_min_normal"/>
	<button function="minimize" state="prelight" draw_ops="button_min_prelight"/>
	<button function="minimize" state="pressed" draw_ops="button_min_pressed"/>
	<button function="maximize" state="normal" draw_ops="button_max_normal"/>
	<button function="maximize" state="prelight" draw_ops="button_max_prelight"/>
	<button function="maximize" state="pressed" draw_ops="button_max_pressed"/>
	<button function="menu" state="normal" draw_ops="button_menu_normal"/>
	<button function="menu" state="prelight" draw_ops="button_menu_prelight"/>
	<button function="menu" state="pressed" draw_ops="button_menu_pressed"/>
</frame_style>

<frame_style name="frame_style_normal_unfocused" geometry="frame_geometry_normal">
	<piece position="title" draw_ops="draw_title_text_inactive"/>
	<piece position="titlebar" draw_ops="draw_title"/>
	<piece position="left_edge" draw_ops="left_edge"/>
	<piece position="right_edge" draw_ops="right_edge"/>
	<piece position="bottom_edge" draw_ops="bottom_edge"/>
	<button function="close" state="normal" draw_ops="button_close_inactive"/>
	<button function="close" state="prelight" draw_ops="button_close_prelight"/>
	<button function="close" state="pressed" draw_ops="button_close_pressed"/>
	<button function="minimize" state="normal" draw_ops="button_min_inactive"/>
	<button function="minimize" state="prelight" draw_ops="button_min_prelight"/>
	<button function="minimize" state="pressed" draw_ops="button_min_pressed"/>
	<button function="maximize" state="normal" draw_ops="button_max_inactive"/>
	<button function="maximize" state="prelight" draw_ops="button_max_prelight"/>
	<button function="maximize" state="pressed" draw_ops="button_max_pressed"/>
	<button function="menu" state="normal" draw_ops="button_menu_inactive"/>
	<button function="menu" state="prelight" draw_ops="button_menu_prelight"/>
	<button function="menu" state="pressed" draw_ops="button_menu_pressed"/>
</frame_style>

<!-- maximized -->
<frame_style name="frame_style_maximized_focused" geometry="frame_geometry_maximized">
	<piece position="title" draw_ops="draw_title_text_normal"/>
	<piece position="titlebar" draw_ops="draw_title_maximized"/>
	<piece position="left_edge" draw_ops="left_edge"/>
	<piece position="right_edge" draw_ops="right_edge"/>
	<piece position="bottom_edge" draw_ops="bottom_edge_maximized"/>	
	<button function="close" state="normal" draw_ops="button_close_normal"/>
	<button function="close" state="prelight" draw_ops="button_close_prelight"/>
	<button function="close" state="pressed" draw_ops="button_close_pressed"/>
	<button function="minimize" state="normal" draw_ops="button_min_normal"/>
	<button function="minimize" state="prelight" draw_ops="button_min_prelight"/>
	<button function="minimize" state="pressed" draw_ops="button_min_pressed"/>
	<button function="maximize" state="normal" draw_ops="button_max_normal"/>
	<button function="maximize" state="prelight" draw_ops="button_max_prelight"/>
	<button function="maximize" state="pressed" draw_ops="button_max_pressed"/>
	<button function="menu" state="normal" draw_ops="button_menu_normal"/>
	<button function="menu" state="prelight" draw_ops="button_menu_prelight"/>
	<button function="menu" state="pressed" draw_ops="button_menu_pressed"/>
</frame_style>

<frame_style name="frame_style_maximized_unfocused" geometry="frame_geometry_maximized">
	<piece position="title" draw_ops="draw_title_text_inactive"/>
	<piece position="titlebar" draw_ops="draw_title_maximized"/>
	<piece position="left_edge" draw_ops="left_edge"/>
	<piece position="right_edge" draw_ops="right_edge"/>
	<piece position="bottom_edge" draw_ops="bottom_edge_maximized"/>
	<button function="close" state="normal" draw_ops="button_close_inactive"/>
	<button function="close" state="prelight" draw_ops="button_close_prelight"/>
	<button function="close" state="pressed" draw_ops="button_close_pressed"/>
	<button function="minimize" state="normal" draw_ops="button_min_inactive"/>
	<button function="minimize" state="prelight" draw_ops="button_min_prelight"/>
	<button function="minimize" state="pressed" draw_ops="button_min_pressed"/>
	<button function="maximize" state="normal" draw_ops="button_max_inactive"/>
	<button function="maximize" state="prelight" draw_ops="button_max_prelight"/>
	<button function="maximize" state="pressed" draw_ops="button_max_pressed"/>
	<button function="menu" state="normal" draw_ops="button_menu_inactive"/>
	<button function="menu" state="prelight" draw_ops="button_menu_prelight"/>
	<button function="menu" state="pressed" draw_ops="button_menu_pressed"/>
</frame_style>

<frame_style_set name="frame_style_set_normal">
  <frame focus="yes" state="normal" resize="both" style="frame_style_normal_focused"/>
  <frame focus="no" state="normal" resize="both" style="frame_style_normal_unfocused"/>
  <frame focus="yes" state="maximized" style="frame_style_maximized_focused"/>
  <frame focus="no" state="maximized" style="frame_style_maximized_unfocused"/>
  <frame focus="yes" state="shaded" style="frame_style_normal_focused"/>
  <frame focus="no" state="shaded" style="frame_style_normal_unfocused"/>
  <frame focus="yes" state="maximized_and_shaded" style="frame_style_maximized_focused"/>
  <frame focus="no" state="maximized_and_shaded" style="frame_style_maximized_unfocused"/>
</frame_style_set>

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

</metacity_theme>
