Image 01
profile-image

rmomota

Rui Mota , Portugal
To fix two buttons bug is easy.
Just add to theme xml:

<draw_ops name="title-focused-fixed">
<include name="middle-titlebar-hi"/>
<include name="left-titlebar"/>
<include name="right-titlebar"/>
<image filename="one-button-mask-focused.png" x="LeftTitlebarEdge - 1" y="TopButtonBorder" width="object_width" height="object_height"/>
<image filename="two-buttons-mask-focused.png" x="(width - object_width - RightTitlebarEdge + 2)" y="TopButtonBorder" width="object_width" height="object_height"/>
</draw_ops>

<draw_ops name="title-unfocused-fixed">
<include name="middle-titlebar"/>
<include name="left-titlebar"/>
<include name="right-titlebar"/>
<image filename="one-button-mask-unfocused.png" x="LeftTitlebarEdge - 1" y="TopButtonBorder" width="object_width" height="object_height"/>
<image filename="two-buttons-mask-unfocused.png" x="(width - object_width - RightTitlebarEdge + 2)" y="TopButtonBorder" width="object_width" height="object_height"/>
</draw_ops>

<frame_style name="normal-focused-fixed" geometry="normal" parent="normal-focused">
<piece position="titlebar" draw_ops="title-focused-fixed"/>
</frame_style>

<frame_style name="normal-unfocused-fixed" geometry="normal" parent="normal-unfocused">
<piece position="titlebar" draw_ops="title-unfocused-fixed"/>
</frame_style>

and add two lines to normal frame_style_set:
<frame focus="yes" state="normal" resize="none" style="normal-focused-fixed"/>
<frame focus="no" state="normal" resize="none" style="normal-unfocused-fixed"/>

then create a two-buttons-mask* images derived from three-button-mask* images.

Making or changing a theme is easy.
Check this guide:
http://developer.gnome.org/doc/tutorials/metacity/metacity-themes.html

Enjoy. - Jul 26 2007