<?xml version="1.0"?>
<metacity_theme>
<info>
  <name>T-ish</name>
  <author>Toni Milovan (tmilovan@efpu.hr) with additional help from Christoph Trassl(ch.trassl@gmail.com)</author>
  <copyright>none</copyright>
  <date>November 2005</date>
  <description>A theme based on Glossy P. by m5brane and modded to meet T-ish requrements</description>
</info>

<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!--  DEFINE THE FRAME GEOMETRIES HERE -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

<frame_geometry name="normal" rounded_top_left="true" rounded_bottom_left="true" rounded_top_right="true" rounded_bottom_right="true">
  <distance name="left_width" value="6"/>
  <distance name="right_width" value="6"/>
  <distance name="bottom_height" value="6"/>
  <distance name="left_titlebar_edge" value="7"/>
  <distance name="right_titlebar_edge" value="3"/>
  <distance name="button_width" value="21"/>
  <distance name="button_height" value="23"/>
  <distance name="title_vertical_pad" value="0"/>
  <border name="title_border" left="1" right="1" top="2" bottom="1"/>
  <border name="button_border" left="0" right="1" top="2" bottom="1"/>
</frame_geometry>

<!-- The normal geometry w/ border thicknesses set to zero -->
<frame_geometry name="normal_small_borders" rounded_top_left="false" rounded_bottom_left="false" rounded_top_right="false" rounded_bottom_right="false">
  <distance name="left_width" value="0"/>
  <distance name="right_width" value="0"/>
  <distance name="bottom_height" value="0"/>
  <distance name="left_titlebar_edge" value="7"/>
  <distance name="right_titlebar_edge" value="3"/>
  <distance name="button_width" value="21"/>
  <distance name="button_height" value="23"/>
  <distance name="title_vertical_pad" value="0"/>
  <border name="title_border" left="1" right="1" top="2" bottom="1"/>
  <border name="button_border" left="0" right="1" top="2" bottom="1"/>
</frame_geometry>

<!-- Utility windows (palettes, etc) have the same geometry as normal windows -->
<frame_geometry name="utility" title_scale="small" parent="normal"/>

<frame_geometry name="border" has_title="false">
  <distance name="left_width" value="4"/>
  <distance name="right_width" value="4"/>
  <distance name="bottom_height" value="4"/>
  <distance name="left_titlebar_edge" value="0"/>
  <distance name="right_titlebar_edge" value="0"/>
  <distance name="button_width" value="0"/>
  <distance name="button_height" value="0"/>
  <distance name="title_vertical_pad" value="0"/>
  <border name="title_border" left="0" right="0" top="0" bottom="0"/>
  <border name="button_border" left="0" right="0" top="0" bottom="0"/>
</frame_geometry>

<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- Define constants that can be used later     -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

<constant name="ThickLineWidth" value="3"/>
<constant name="IconTitleSpacing" value="6"/>

<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- Begin Defining Drawing Operations           -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

<!-- First we define how to draw buttons For each button we specify
       draw_ops for the normal, prelight(hover), and pressed states.-->

<!-- The Menu Button -->
<draw_ops name="menu_button">
  <image filename="menu-button.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="menu_button_prelight">
  <image filename="menu-button-pressed.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="menu_button_pressed">
  <image filename="menu-button-pressed.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<!-- The Minimize Button --> 
<draw_ops name="minimize_button">
  <image filename="button-min.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="minimize_button_prelight">
  <image filename="button-min-focus.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="minimize_button_pressed">
  <include name="minimize_button"/>
</draw_ops>

<!-- The Maximize Button -->
<draw_ops name="maximize_button">
  <image filename="button-max.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="maximize_button_prelight">
  <image filename="button-max-focus.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="maximize_button_pressed">
  <include name="maximize_button"/>
</draw_ops>

<!-- The Restore Button -->
<draw_ops name="restore_button">
  <image filename="button-max.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="restore_button_prelight">
  <image filename="button-max-focus.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="restore_button_pressed">
  <include name="restore_button"/>
</draw_ops>

<!-- The Close Button -->
<draw_ops name="close_button">
  <image filename="button-close.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="close_button_prelight">
  <image filename="button-close-focus.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="close_button_pressed">
  <include name="close_button"/>
</draw_ops>

<!-- Inactive version of close, min, max, and restore -->
<draw_ops name="inactive_button">
  <image filename="button-inactive.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>

<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- Define Drawing Operations for the Window Frames -->
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

<!-- A draw_op that draws nothing -->
<draw_ops name="blank">
<!-- nothing -->
</draw_ops>

<draw_ops name="gradient_background">
    <gradient type="vertical" x="1" y="1" width="width-2" height="top_height-2">
        <color value="#f1f1f1"/>
        <color value="gtk:bg[NORMAL]"/>
    </gradient>
</draw_ops>

<draw_ops name="border_bottom_normal">
    <line color="#747474" x1="0" y1="height-bottom_height" x2="2" y2="height-bottom_height+3"/>
    <line color="#747474" x1="2" y1="height-bottom_height+3" x2="5" y2="height-1"/>
    <line color="#747474" x1="width-1" y1="height-bottom_height" x2="width-3" y2="height-bottom_height+3"/>
    <line color="#747474" x1="width-3" y1="height-bottom_height+3" x2="width-6" y2="height-1"/>
</draw_ops>

<draw_ops name="border_bottom_shaded">
    <line color="#747474" x1="0" y1="height-bottom_height-6" x2="2" y2="height-bottom_height-3"/>
    <line color="#747474" x1="2" y1="height-bottom_height-3" x2="5" y2="height-1"/>
    <line color="#747474" x1="width-1" y1="height-bottom_height-6" x2="width-3" y2="height-bottom_height-3"/>
    <line color="#747474" x1="width-3" y1="height-bottom_height-3" x2="width-6" y2="height-1"/>
</draw_ops>

<draw_ops name="border_top">
    <line color="#747474" x1="0" y1="5" x2="2" y2="2"/>
    <line color="#747474" x1="2" y1="2" x2="5" y2="0"/>
    <line color="#747474" x1="width-right_width" y1="0" x2="width-right_width+3" y2="2"/>
    <line color="#747474" x1="width-right_width+3" y1="2" x2="width-1" y2="5"/> 
</draw_ops>

<!-- This draws the background for the windows. It sets up a dark grey outline, a lighter gray frame with a gradient at the top,
	a window base color the same as the gtk:light[NORMAL] color, and a dark gray interior outline surrounding the "window base"
        that applications use.-->
<draw_ops name="background">
    <!-- First we draw a filled rectangle set to the window frame color (the light gray on the sides and bottom of the window).-->
    <rectangle color="gtk:bg[NORMAL]" x="0" y="0" width="width" height="height" filled="true"/>

    <!-- Now we draw the dark gray outline along the outer edge of the window. Note that, since the origin of the window 
	  (the upper left corner) is (x,y)=(0,0), the lower right corner is (x,y)=(width-1,height-1). -->
    <rectangle color="#747474" x="0" y="0" width="width-1" height="height-1" filled="false"/>
    
    <include name="gradient_background"/>

    <!-- This is a not-so-elegant way of drawing the dark gray outline along the rounded window corners.-->

    <include name="border_bottom_normal"/>
    <include name="border_top"/>

</draw_ops>

<draw_ops name="background_shaded">
    <!-- First we draw a filled rectangle set to the window frame color (the light gray on the sides and bottom of the window).-->
    <rectangle color="gtk:bg[NORMAL]" x="0" y="0" width="width" height="height" filled="true"/>

    <!-- Now we draw the dark gray outline along the outer edge of the window. Note that, since the origin of the window 
	  (the upper left corner) is (x,y)=(0,0), the lower right corner is (x,y)=(width-1,height-1). -->
    <rectangle color="#747474" x="0" y="0" width="width-1" height="height-1" filled="false"/>
    

    <include name="gradient_background"/>
    <include name="border_bottom_shaded"/>
    <include name="border_top"/>
    
</draw_ops>

<!-- Now we set up draw_ops for drawing the title text in different window types -->

<!-- This is for drawing the title text in a focused window. We draw the title twice; one in medium gray
       and then again in black to give a slight shadow effect. If it looks bad, simply remove the first <title/>
       operation. The title is centered in the window, as opposed to centered in the title area. -->

<!-- Uncomment text below if you want the title text to be left aligned-->

<!--<draw_ops name="title_text_focused">
  <clip x="0" y="0" width="width" height="height"/> 
  <title color="#000000"
         x="2" y="(height - title_height) / 2"/> 
</draw_ops>-->


<draw_ops name="title_text_focused">
  <clip x="0" y="0" width="width" height="height"/>
  <title color="#000000"
         x="(width - title_width) / 2" y="(height - title_height) / 2"/> 
</draw_ops>

 <!-- This draws the title text in background (unfocused) windows. -->
<!-- Uncomment text below if you want the title text to be left aligned-->

<!--<draw_ops name="title_text">
  <clip x="0" y="0" width="width" height="height"/>
  <title color="#747474"
         x="2" y="(height - title_height) / 2"/>
</draw_ops>-->

<draw_ops name="title_text">
  <clip x="0" y="0" width="width" height="height"/>
  <title color="#747474"
         x="(width - title_width) / 2" y="(height - title_height) / 2"/>
</draw_ops>


<!-- Set up draw_ops for drawing the actual title. These could be more involved,
       but right now we just include the draw_ops we just defined for drawing the 
       title text in the titlebar. -->

<draw_ops name="title_normal">
  <include name="title_text"/>
</draw_ops>

<draw_ops name="title_focused">
    <include name="title_text_focused"/>
</draw_ops>

<draw_ops name="title_utility">
  <include name="title_text"/>
</draw_ops>

<draw_ops name="title_utility_focused">
  <include name="title_text_focused"/>
</draw_ops>

<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!--   Define how to use the draw_ops to draw the window frames.                                         -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->

<!-- First we set up normal, focused windows. They use the normal window
       geometry. -->
<frame_style name="normal_focused" geometry="normal">
  <piece position="entire_background" draw_ops="background"/>
  <piece position="title" draw_ops="title_focused"/>

<!-- Use the button definitions we made earlier, telling metacity how to draw
       buttons in normal, prelight, and pressed states. Any undefined state
       defautls to the normal style. -->
  <button function="close" state="normal" draw_ops="close_button"/>
  <button function="close" state="prelight" draw_ops="close_button_prelight"/>
  <button function="close" state="pressed" draw_ops="close_button_pressed"/>
  <button function="minimize" state="normal" draw_ops="minimize_button"/>
  <button function="minimize" state="prelight" draw_ops="minimize_button_prelight"/>
  <button function="minimize" state="pressed" draw_ops="minimize_button_pressed"/>
  <button function="maximize" state="normal" draw_ops="maximize_button"/>
  <button function="maximize" state="prelight" draw_ops="maximize_button_prelight"/>
  <button function="maximize" state="pressed" draw_ops="maximize_button_pressed"/>
  <button function="menu" state="normal" draw_ops="menu_button"/>
  <button function="menu" state="prelight" draw_ops="menu_button_prelight"/>
  <button function="menu" state="pressed" draw_ops="menu_button_pressed"/>
</frame_style>

<!-- This sets up background (unfocused) windows. They have grayed out title text 
       and their buttons are drawn in the inactive style. -->
<frame_style name="normal_unfocused" geometry="normal">
  <piece position="entire_background" draw_ops="background"/>
  <piece position="title" draw_ops="title_normal"/>

<!-- Even though buttons are drawn as inactive, we define pressed states since you
       can press a button on a window when it is unfocused. Depending on the button, 
       the window may or may not change focus before the mouse button is released.-->
  <button function="close" state="normal" draw_ops="inactive_button"/>
  <button function="close" state="pressed" draw_ops="close_button_pressed"/>
  <button function="minimize" state="normal" draw_ops="inactive_button"/>
  <button function="minimize" state="pressed" draw_ops="minimize_button_pressed"/>
  <button function="maximize" state="normal" draw_ops="inactive_button"/>
  <button function="maximize" state="pressed" draw_ops="maximize_button_pressed"/>
  <button function="menu" state="normal" draw_ops="menu_button"/>
  <button function="menu" state="pressed" draw_ops="menu_button_pressed"/>
</frame_style>

<!-- Frame style for a window that is "rolled up" (windowshade or shaded mode). -->
<frame_style name="shaded_focused" geometry="normal" parent="normal_focused">
    <piece position="entire_background" draw_ops="background_shaded"/>
    <piece position="title" draw_ops="title_focused"/>
</frame_style>
<frame_style name="shaded_unfocused" geometry="normal" parent="normal_unfocused">
    <piece position="entire_background" draw_ops="background_shaded"/>
    <piece position="title" draw_ops="title_focused"/>
</frame_style>

<frame_style name="maximized_unfocused" geometry="normal_small_borders" parent="normal_unfocused">
  <piece position="entire_background" draw_ops="blank"/>
</frame_style>

<frame_style name="maximized_focused" geometry="normal_small_borders" parent="normal_focused">
<piece position="entire_background" draw_ops="blank"/>
  <button function="maximize" state="normal" draw_ops="restore_button"/>
  <button function="maximize" state="pressed" draw_ops="restore_button_pressed"/>
</frame_style>

<frame_style name="utility_unfocused" geometry="utility" parent="normal_unfocused">
  <piece position="title" draw_ops="title_utility"/>
</frame_style>

<frame_style name="utility_focused" geometry="utility" parent="normal_focused">
  <piece position="title" draw_ops="title_utility_focused"/>
</frame_style>

<frame_style name="border" geometry="border" parent="normal_unfocused">
  <piece position="entire_background" draw_ops="background"/>
  <piece position="title" draw_ops="blank"/>
</frame_style>

<frame_style_set name="normal">
<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_focused"/>
<frame focus="no" state="maximized_and_shaded" style="maximized_unfocused"/>
</frame_style_set>

<frame_style_set name="utility" parent="normal">
<frame focus="yes" state="normal" resize="both" style="utility_focused"/>
<frame focus="no" state="normal" resize="both" style="utility_unfocused"/>
<frame focus="yes" state="maximized" style="utility_focused"/>
<frame focus="no" state="maximized" style="utility_unfocused"/>
<frame focus="yes" state="shaded" style="utility_focused"/>
<frame focus="no" state="shaded" style="utility_unfocused"/>
<frame focus="yes" state="maximized_and_shaded" style="utility_focused"/>
<frame focus="no" state="maximized_and_shaded" style="utility_unfocused"/>
</frame_style_set>

<frame_style_set name="border" parent="normal">
<frame focus="yes" state="normal" resize="both" style="border"/>
<frame focus="no" state="normal" resize="both" style="border"/>
<frame focus="yes" state="maximized" style="utility_focused"/>
<frame focus="no" state="maximized" style="utility_unfocused"/>
<frame focus="yes" state="shaded" style="utility_focused"/>
<frame focus="no" state="shaded" style="utility_unfocused"/>
<frame focus="yes" state="maximized_and_shaded" style="utility_focused"/>
<frame focus="no" state="maximized_and_shaded" style="utility_unfocused"/>
</frame_style_set>

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

<menu_icon function="close" state="normal" draw_ops="close_button"/>
<menu_icon function="maximize" state="normal" draw_ops="maximize_button"/>
<menu_icon function="unmaximize" state="normal" draw_ops="restore_button"/>
<menu_icon function="minimize" state="normal" draw_ops="minimize_button"/>

</metacity_theme>
