metacity themes and button order



Hi,

A note for theme authors. Metacity now has all the code in place to
reorder buttons. You can see this in metacity-theme-viewer, there's a
new tab for testing your theme with different button orders.  (Users
can't configure the button order just yet, that's coming soon, but I
implemented the code for moving the buttons as shown in the theme
viewer.)

A feature added some time ago makes it easier to support buttons
moving around. Older versions of metacity also support this theme
feature, so feel free to use it, you won't break people running older
metacity.

Here is the secret, from Esco:

        <button function="left_middle_background" state="pressed"
                draw_ops="button_pressed_bg"/>
        <button function="right_middle_background" state="pressed"
                draw_ops="button_pressed_bg"/>

this is in addition to function="maximize" etc. and allows you to draw
part of the button depending on position instead of function.

The positions are left_left_background, left_middle_background,
left_right_background, right_left_background, right_middle_background,
right_right_background.

left_*_background are for the cluster of buttons on the left corner of
the window. left_left_background is the leftmost button in that
cluster, left_right_background the rightmost, and
left_middle_background is for any intermediate buttons.

right_*_background is the cluster on the right.

If you don't specify left_left/left_right, then left_middle is used
for buttons in those positions. So if all your buttons have the same
background, you can use just *_middle_background (or just draw the
background as part of the function="maximize" etc. drawing ops)
instead of providing all 6 positions.

Let me know if there are any problems.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]