Buttons seem to work!
authorDave Foster <daf@minuslab.net>
Wed, 12 Dec 2007 23:02:38 +0000 (18:02 -0500)
committerMikael Magnusson <mikachu@gmail.com>
Thu, 14 Oct 2010 13:54:47 +0000 (15:54 +0200)
obrender/button.h
obrender/render.h
obrender/theme.c
openbox/client_menu.c
openbox/framerender.c

index 59d04f9..659c3ea 100644 (file)
@@ -7,50 +7,5 @@
 #include <X11/Xutil.h>
 #include <glib.h>
 
 #include <X11/Xutil.h>
 #include <glib.h>
 
-struct _RrButton {
-    const RrInstance *inst;
-
-    /* colors */
-    RrColor *focused_unpressed_color;
-    RrColor *unfocused_unpressed_color;
-    RrColor *focused_pressed_color;
-    RrColor *unfocused_pressed_color;
-    RrColor *disabled_focused_color;
-    RrColor *disabled_unfocused_color;
-    RrColor *hover_focused_color;
-    RrColor *hover_unfocused_color;
-    RrColor *toggled_hover_focused_color;
-    RrColor *toggled_hover_unfocused_color;
-    RrColor *toggled_focused_pressed_color;
-    RrColor *toggled_unfocused_pressed_color;
-    RrColor *toggled_focused_unpressed_color;
-    RrColor *toggled_unfocused_unpressed_color;
-    
-    /* masks */
-    RrPixmapMask *mask;
-    RrPixmapMask *pressed_mask;
-    RrPixmapMask *disabled_mask;
-    RrPixmapMask *hover_mask;
-    RrPixmapMask *toggled_mask;
-    RrPixmapMask *toggled_hover_mask;
-    RrPixmapMask *toggled_pressed_mask;
-   
-    /* textures */
-    RrAppearance *a_focused_unpressed;
-    RrAppearance *a_unfocused_unpressed;
-    RrAppearance *a_focused_pressed;
-    RrAppearance *a_unfocused_pressed;
-    RrAppearance *a_disabled_focused;
-    RrAppearance *a_disabled_unfocused;
-    RrAppearance *a_hover_focused;
-    RrAppearance *a_hover_unfocused;
-    RrAppearance *a_toggled_focused_unpressed;
-    RrAppearance *a_toggled_unfocused_unpressed;
-    RrAppearance *a_toggled_focused_pressed;
-    RrAppearance *a_toggled_unfocused_pressed;
-    RrAppearance *a_toggled_hover_focused;
-    RrAppearance *a_toggled_hover_unfocused;
-
-};
 
 #endif /* __button_h */
 
 #endif /* __button_h */
index dad3c54..d8d47c9 100644 (file)
@@ -272,6 +272,52 @@ struct _RrImage {
     gpointer           destroy_data;
 };
 
     gpointer           destroy_data;
 };
 
+struct _RrButton {
+    const RrInstance *inst;
+
+    /* colors */
+    RrColor *focused_unpressed_color;
+    RrColor *unfocused_unpressed_color;
+    RrColor *focused_pressed_color;
+    RrColor *unfocused_pressed_color;
+    RrColor *disabled_focused_color;
+    RrColor *disabled_unfocused_color;
+    RrColor *hover_focused_color;
+    RrColor *hover_unfocused_color;
+    RrColor *toggled_hover_focused_color;
+    RrColor *toggled_hover_unfocused_color;
+    RrColor *toggled_focused_pressed_color;
+    RrColor *toggled_unfocused_pressed_color;
+    RrColor *toggled_focused_unpressed_color;
+    RrColor *toggled_unfocused_unpressed_color;
+    
+    /* masks */
+    RrPixmapMask *mask;
+    RrPixmapMask *pressed_mask;
+    RrPixmapMask *disabled_mask;
+    RrPixmapMask *hover_mask;
+    RrPixmapMask *toggled_mask;
+    RrPixmapMask *toggled_hover_mask;
+    RrPixmapMask *toggled_pressed_mask;
+   
+    /* textures */
+    RrAppearance *a_focused_unpressed;
+    RrAppearance *a_unfocused_unpressed;
+    RrAppearance *a_focused_pressed;
+    RrAppearance *a_unfocused_pressed;
+    RrAppearance *a_disabled_focused;
+    RrAppearance *a_disabled_unfocused;
+    RrAppearance *a_hover_focused;
+    RrAppearance *a_hover_unfocused;
+    RrAppearance *a_toggled_focused_unpressed;
+    RrAppearance *a_toggled_unfocused_unpressed;
+    RrAppearance *a_toggled_focused_pressed;
+    RrAppearance *a_toggled_unfocused_pressed;
+    RrAppearance *a_toggled_hover_focused;
+    RrAppearance *a_toggled_hover_unfocused;
+
+};
+
 /* these are the same on all endian machines because it seems to be dependant
    on the endianness of the gfx card, not the cpu. */
 #define RrDefaultAlphaOffset 24
 /* these are the same on all endian machines because it seems to be dependant
    on the endianness of the gfx card, not the cpu. */
 #define RrDefaultAlphaOffset 24
index a2b45e6..fe43c1c 100644 (file)
@@ -738,7 +738,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
     /* hover */
     READ_APPEARANCE_COPY("window.active.button-desk.hover.bg",
                          theme->btn_desk->a_hover_focused, TRUE,
     /* hover */
     READ_APPEARANCE_COPY("window.active.button-desk.hover.bg",
                          theme->btn_desk->a_hover_focused, TRUE,
-                         theme->a_focused_unpressed);
+                         theme->btn_desk->a_focused_unpressed);
     READ_APPEARANCE_COPY("window.inactive.button-desk.hover.bg",
                          theme->btn_desk->a_hover_unfocused, TRUE,
                          theme->btn_desk->a_unfocused_unpressed);
     READ_APPEARANCE_COPY("window.inactive.button-desk.hover.bg",
                          theme->btn_desk->a_hover_unfocused, TRUE,
                          theme->btn_desk->a_unfocused_unpressed);
@@ -1178,228 +1178,228 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
     theme->a_menu_text_disabled_selected->texture[0].data.text.shadow_alpha =
         theme->menu_text_disabled_shadow_alpha;
 
     theme->a_menu_text_disabled_selected->texture[0].data.text.shadow_alpha =
         theme->menu_text_disabled_shadow_alpha;
 
-    theme->a_disabled_focused_max->texture[0].type =
-        theme->a_disabled_unfocused_max->texture[0].type =
-        theme->a_hover_focused_max->texture[0].type =
-        theme->a_hover_unfocused_max->texture[0].type =
-        theme->a_toggled_hover_focused_max->texture[0].type =
-        theme->a_toggled_hover_unfocused_max->texture[0].type =
-        theme->a_toggled_focused_unpressed_max->texture[0].type =
-        theme->a_toggled_unfocused_unpressed_max->texture[0].type =
-        theme->a_toggled_focused_pressed_max->texture[0].type =
-        theme->a_toggled_unfocused_pressed_max->texture[0].type =
-        theme->a_focused_unpressed_max->texture[0].type =
-        theme->a_focused_pressed_max->texture[0].type =
-        theme->a_unfocused_unpressed_max->texture[0].type =
-        theme->a_unfocused_pressed_max->texture[0].type =
-        theme->a_disabled_focused_close->texture[0].type =
-        theme->a_disabled_unfocused_close->texture[0].type =
-        theme->a_hover_focused_close->texture[0].type =
-        theme->a_hover_unfocused_close->texture[0].type =
-        theme->a_focused_unpressed_close->texture[0].type =
-        theme->a_focused_pressed_close->texture[0].type =
-        theme->a_unfocused_unpressed_close->texture[0].type =
-        theme->a_unfocused_pressed_close->texture[0].type =
-        theme->a_disabled_focused_desk->texture[0].type =
-        theme->a_disabled_unfocused_desk->texture[0].type =
-        theme->a_hover_focused_desk->texture[0].type =
-        theme->a_hover_unfocused_desk->texture[0].type =
-        theme->a_toggled_hover_focused_desk->texture[0].type =
-        theme->a_toggled_hover_unfocused_desk->texture[0].type =
-        theme->a_toggled_focused_unpressed_desk->texture[0].type =
-        theme->a_toggled_unfocused_unpressed_desk->texture[0].type =
-        theme->a_toggled_focused_pressed_desk->texture[0].type =
-        theme->a_toggled_unfocused_pressed_desk->texture[0].type =
-        theme->a_focused_unpressed_desk->texture[0].type =
-        theme->a_focused_pressed_desk->texture[0].type =
-        theme->a_unfocused_unpressed_desk->texture[0].type =
-        theme->a_unfocused_pressed_desk->texture[0].type =
-        theme->a_disabled_focused_shade->texture[0].type =
-        theme->a_disabled_unfocused_shade->texture[0].type =
-        theme->a_hover_focused_shade->texture[0].type =
-        theme->a_hover_unfocused_shade->texture[0].type =
-        theme->a_toggled_hover_focused_shade->texture[0].type =
-        theme->a_toggled_hover_unfocused_shade->texture[0].type =
-        theme->a_toggled_focused_unpressed_shade->texture[0].type =
-        theme->a_toggled_unfocused_unpressed_shade->texture[0].type =
-        theme->a_toggled_focused_pressed_shade->texture[0].type =
-        theme->a_toggled_unfocused_pressed_shade->texture[0].type =
-        theme->a_focused_unpressed_shade->texture[0].type =
-        theme->a_focused_pressed_shade->texture[0].type =
-        theme->a_unfocused_unpressed_shade->texture[0].type =
-        theme->a_unfocused_pressed_shade->texture[0].type =
-        theme->a_disabled_focused_iconify->texture[0].type =
-        theme->a_disabled_unfocused_iconify->texture[0].type =
-        theme->a_hover_focused_iconify->texture[0].type =
-        theme->a_hover_unfocused_iconify->texture[0].type =
-        theme->a_focused_unpressed_iconify->texture[0].type =
-        theme->a_focused_pressed_iconify->texture[0].type =
-        theme->a_unfocused_unpressed_iconify->texture[0].type =
-        theme->a_unfocused_pressed_iconify->texture[0].type =
+    theme->btn_max->a_disabled_focused->texture[0].type =
+        theme->btn_max->a_disabled_unfocused->texture[0].type =
+        theme->btn_max->a_hover_focused->texture[0].type =
+        theme->btn_max->a_hover_unfocused->texture[0].type =
+        theme->btn_max->a_toggled_hover_focused->texture[0].type =
+        theme->btn_max->a_toggled_hover_unfocused->texture[0].type =
+        theme->btn_max->a_toggled_focused_unpressed->texture[0].type =
+        theme->btn_max->a_toggled_unfocused_unpressed->texture[0].type =
+        theme->btn_max->a_toggled_focused_pressed->texture[0].type =
+        theme->btn_max->a_toggled_unfocused_pressed->texture[0].type =
+        theme->btn_max->a_focused_unpressed->texture[0].type =
+        theme->btn_max->a_focused_pressed->texture[0].type =
+        theme->btn_max->a_unfocused_unpressed->texture[0].type =
+        theme->btn_max->a_unfocused_pressed->texture[0].type =
+        theme->btn_close->a_disabled_focused->texture[0].type =
+        theme->btn_close->a_disabled_unfocused->texture[0].type =
+        theme->btn_close->a_hover_focused->texture[0].type =
+        theme->btn_close->a_hover_unfocused->texture[0].type =
+        theme->btn_close->a_focused_unpressed->texture[0].type =
+        theme->btn_close->a_focused_pressed->texture[0].type =
+        theme->btn_close->a_unfocused_unpressed->texture[0].type =
+        theme->btn_close->a_unfocused_pressed->texture[0].type =
+        theme->btn_desk->a_disabled_focused->texture[0].type =
+        theme->btn_desk->a_disabled_unfocused->texture[0].type =
+        theme->btn_desk->a_hover_focused->texture[0].type =
+        theme->btn_desk->a_hover_unfocused->texture[0].type =
+        theme->btn_desk->a_toggled_hover_focused->texture[0].type =
+        theme->btn_desk->a_toggled_hover_unfocused->texture[0].type =
+        theme->btn_desk->a_toggled_focused_unpressed->texture[0].type =
+        theme->btn_desk->a_toggled_unfocused_unpressed->texture[0].type =
+        theme->btn_desk->a_toggled_focused_pressed->texture[0].type =
+        theme->btn_desk->a_toggled_unfocused_pressed->texture[0].type =
+        theme->btn_desk->a_focused_unpressed->texture[0].type =
+        theme->btn_desk->a_focused_pressed->texture[0].type =
+        theme->btn_desk->a_unfocused_unpressed->texture[0].type =
+        theme->btn_desk->a_unfocused_pressed->texture[0].type =
+        theme->btn_shade->a_disabled_focused->texture[0].type =
+        theme->btn_shade->a_disabled_unfocused->texture[0].type =
+        theme->btn_shade->a_hover_focused->texture[0].type =
+        theme->btn_shade->a_hover_unfocused->texture[0].type =
+        theme->btn_shade->a_toggled_hover_focused->texture[0].type =
+        theme->btn_shade->a_toggled_hover_unfocused->texture[0].type =
+        theme->btn_shade->a_toggled_focused_unpressed->texture[0].type =
+        theme->btn_shade->a_toggled_unfocused_unpressed->texture[0].type =
+        theme->btn_shade->a_toggled_focused_pressed->texture[0].type =
+        theme->btn_shade->a_toggled_unfocused_pressed->texture[0].type =
+        theme->btn_shade->a_focused_unpressed->texture[0].type =
+        theme->btn_shade->a_focused_pressed->texture[0].type =
+        theme->btn_shade->a_unfocused_unpressed->texture[0].type =
+        theme->btn_shade->a_unfocused_pressed->texture[0].type =
+        theme->btn_iconify->a_disabled_focused->texture[0].type =
+        theme->btn_iconify->a_disabled_unfocused->texture[0].type =
+        theme->btn_iconify->a_hover_focused->texture[0].type =
+        theme->btn_iconify->a_hover_unfocused->texture[0].type =
+        theme->btn_iconify->a_focused_unpressed->texture[0].type =
+        theme->btn_iconify->a_focused_pressed->texture[0].type =
+        theme->btn_iconify->a_unfocused_unpressed->texture[0].type =
+        theme->btn_iconify->a_unfocused_pressed->texture[0].type =
         theme->a_menu_bullet_normal->texture[0].type =
         theme->a_menu_bullet_selected->texture[0].type = RR_TEXTURE_MASK;
 
         theme->a_menu_bullet_normal->texture[0].type =
         theme->a_menu_bullet_selected->texture[0].type = RR_TEXTURE_MASK;
 
-    theme->a_disabled_focused_max->texture[0].data.mask.mask =
-        theme->a_disabled_unfocused_max->texture[0].data.mask.mask =
-        theme->max_disabled_mask;
-    theme->a_hover_focused_max->texture[0].data.mask.mask =
-        theme->a_hover_unfocused_max->texture[0].data.mask.mask =
-        theme->max_hover_mask;
-    theme->a_focused_pressed_max->texture[0].data.mask.mask =
-        theme->a_unfocused_pressed_max->texture[0].data.mask.mask =
-        theme->max_pressed_mask;
-    theme->a_focused_unpressed_max->texture[0].data.mask.mask =
-        theme->a_unfocused_unpressed_max->texture[0].data.mask.mask =
-        theme->max_mask;
-    theme->a_toggled_hover_focused_max->texture[0].data.mask.mask =
-        theme->a_toggled_hover_unfocused_max->texture[0].data.mask.mask =
-        theme->max_toggled_hover_mask;
-    theme->a_toggled_focused_unpressed_max->texture[0].data.mask.mask =
-        theme->a_toggled_unfocused_unpressed_max->texture[0].data.mask.mask =
-        theme->max_toggled_mask;
-    theme->a_toggled_focused_pressed_max->texture[0].data.mask.mask =
-        theme->a_toggled_unfocused_pressed_max->texture[0].data.mask.mask =
-        theme->max_toggled_pressed_mask;
-    theme->a_disabled_focused_close->texture[0].data.mask.mask =
-        theme->a_disabled_unfocused_close->texture[0].data.mask.mask =
-        theme->close_disabled_mask;
-    theme->a_hover_focused_close->texture[0].data.mask.mask =
-        theme->a_hover_unfocused_close->texture[0].data.mask.mask =
-        theme->close_hover_mask;
-    theme->a_focused_pressed_close->texture[0].data.mask.mask =
-        theme->a_unfocused_pressed_close->texture[0].data.mask.mask =
-        theme->close_pressed_mask;
-    theme->a_focused_unpressed_close->texture[0].data.mask.mask =
-        theme->a_unfocused_unpressed_close->texture[0].data.mask.mask =
-        theme->close_mask;
-    theme->a_disabled_focused_desk->texture[0].data.mask.mask =
-        theme->a_disabled_unfocused_desk->texture[0].data.mask.mask =
-        theme->desk_disabled_mask;
-    theme->a_hover_focused_desk->texture[0].data.mask.mask =
-        theme->a_hover_unfocused_desk->texture[0].data.mask.mask =
-        theme->desk_hover_mask;
-    theme->a_focused_pressed_desk->texture[0].data.mask.mask =
-        theme->a_unfocused_pressed_desk->texture[0].data.mask.mask =
-        theme->desk_pressed_mask;
-    theme->a_focused_unpressed_desk->texture[0].data.mask.mask =
-        theme->a_unfocused_unpressed_desk->texture[0].data.mask.mask =
-        theme->desk_mask;
-    theme->a_toggled_hover_focused_desk->texture[0].data.mask.mask =
-        theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.mask =
-        theme->desk_toggled_hover_mask;
-    theme->a_toggled_focused_unpressed_desk->texture[0].data.mask.mask =
-        theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.mask =
-        theme->desk_toggled_mask;
-    theme->a_toggled_focused_pressed_desk->texture[0].data.mask.mask =
-        theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.mask =
-        theme->desk_toggled_pressed_mask;
-    theme->a_disabled_focused_shade->texture[0].data.mask.mask =
-        theme->a_disabled_unfocused_shade->texture[0].data.mask.mask =
-        theme->shade_disabled_mask;
-    theme->a_hover_focused_shade->texture[0].data.mask.mask =
-        theme->a_hover_unfocused_shade->texture[0].data.mask.mask =
-        theme->shade_hover_mask;
-    theme->a_focused_pressed_shade->texture[0].data.mask.mask =
-        theme->a_unfocused_pressed_shade->texture[0].data.mask.mask =
-        theme->shade_pressed_mask;
-    theme->a_focused_unpressed_shade->texture[0].data.mask.mask =
-        theme->a_unfocused_unpressed_shade->texture[0].data.mask.mask =
-        theme->shade_mask;
-    theme->a_toggled_hover_focused_shade->texture[0].data.mask.mask =
-        theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.mask =
-        theme->shade_toggled_hover_mask;
-    theme->a_toggled_focused_unpressed_shade->texture[0].data.mask.mask =
-        theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.mask =
-        theme->shade_toggled_mask;
-    theme->a_toggled_focused_pressed_shade->texture[0].data.mask.mask =
-        theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.mask =
-        theme->shade_toggled_pressed_mask;
-    theme->a_disabled_focused_iconify->texture[0].data.mask.mask =
-        theme->a_disabled_unfocused_iconify->texture[0].data.mask.mask =
-        theme->iconify_disabled_mask;
-    theme->a_hover_focused_iconify->texture[0].data.mask.mask =
-        theme->a_hover_unfocused_iconify->texture[0].data.mask.mask =
-        theme->iconify_hover_mask;
-    theme->a_focused_pressed_iconify->texture[0].data.mask.mask =
-        theme->a_unfocused_pressed_iconify->texture[0].data.mask.mask =
-        theme->iconify_pressed_mask;
-    theme->a_focused_unpressed_iconify->texture[0].data.mask.mask =
-        theme->a_unfocused_unpressed_iconify->texture[0].data.mask.mask =
-        theme->iconify_mask;
+    theme->btn_max->a_disabled_focused->texture[0].data.mask.mask =
+        theme->btn_max->a_disabled_unfocused->texture[0].data.mask.mask =
+        theme->btn_max->disabled_mask;
+    theme->btn_max->a_hover_focused->texture[0].data.mask.mask =
+        theme->btn_max->a_hover_unfocused->texture[0].data.mask.mask =
+        theme->btn_max->hover_mask;
+    theme->btn_max->a_focused_pressed->texture[0].data.mask.mask =
+        theme->btn_max->a_unfocused_pressed->texture[0].data.mask.mask =
+        theme->btn_max->pressed_mask;
+    theme->btn_max->a_focused_unpressed->texture[0].data.mask.mask =
+        theme->btn_max->a_unfocused_unpressed->texture[0].data.mask.mask =
+        theme->btn_max->mask;
+    theme->btn_max->a_toggled_hover_focused->texture[0].data.mask.mask =
+        theme->btn_max->a_toggled_hover_unfocused->texture[0].data.mask.mask =
+        theme->btn_max->toggled_hover_mask;
+    theme->btn_max->a_toggled_focused_unpressed->texture[0].data.mask.mask =
+        theme->btn_max->a_toggled_unfocused_unpressed->texture[0].data.mask.mask =
+        theme->btn_max->toggled_mask;
+    theme->btn_max->a_toggled_focused_pressed->texture[0].data.mask.mask =
+        theme->btn_max->a_toggled_unfocused_pressed->texture[0].data.mask.mask =
+        theme->btn_max->toggled_pressed_mask;
+    theme->btn_close->a_disabled_focused->texture[0].data.mask.mask =
+        theme->btn_close->a_disabled_unfocused->texture[0].data.mask.mask =
+        theme->btn_close->disabled_mask;
+    theme->btn_close->a_hover_focused->texture[0].data.mask.mask =
+        theme->btn_close->a_hover_unfocused->texture[0].data.mask.mask =
+        theme->btn_close->hover_mask;
+    theme->btn_close->a_focused_pressed->texture[0].data.mask.mask =
+        theme->btn_close->a_unfocused_pressed->texture[0].data.mask.mask =
+        theme->btn_close->pressed_mask;
+    theme->btn_close->a_focused_unpressed->texture[0].data.mask.mask =
+        theme->btn_close->a_unfocused_unpressed->texture[0].data.mask.mask =
+        theme->btn_close->mask;
+    theme->btn_desk->a_disabled_focused->texture[0].data.mask.mask =
+        theme->btn_desk->a_disabled_unfocused->texture[0].data.mask.mask =
+        theme->btn_desk->disabled_mask;
+    theme->btn_desk->a_hover_focused->texture[0].data.mask.mask =
+        theme->btn_desk->a_hover_unfocused->texture[0].data.mask.mask =
+        theme->btn_desk->hover_mask;
+    theme->btn_desk->a_focused_pressed->texture[0].data.mask.mask =
+        theme->btn_desk->a_unfocused_pressed->texture[0].data.mask.mask =
+        theme->btn_desk->pressed_mask;
+    theme->btn_desk->a_focused_unpressed->texture[0].data.mask.mask =
+        theme->btn_desk->a_unfocused_unpressed->texture[0].data.mask.mask =
+        theme->btn_desk->mask;
+    theme->btn_desk->a_toggled_hover_focused->texture[0].data.mask.mask =
+        theme->btn_desk->a_toggled_hover_unfocused->texture[0].data.mask.mask =
+        theme->btn_desk->toggled_hover_mask;
+    theme->btn_desk->a_toggled_focused_unpressed->texture[0].data.mask.mask =
+        theme->btn_desk->a_toggled_unfocused_unpressed->texture[0].data.mask.mask =
+        theme->btn_desk->toggled_mask;
+    theme->btn_desk->a_toggled_focused_pressed->texture[0].data.mask.mask =
+        theme->btn_desk->a_toggled_unfocused_pressed->texture[0].data.mask.mask =
+        theme->btn_desk->toggled_pressed_mask;
+    theme->btn_shade->a_disabled_focused->texture[0].data.mask.mask =
+        theme->btn_shade->a_disabled_unfocused->texture[0].data.mask.mask =
+        theme->btn_shade->disabled_mask;
+    theme->btn_shade->a_hover_focused->texture[0].data.mask.mask =
+        theme->btn_shade->a_hover_unfocused->texture[0].data.mask.mask =
+        theme->btn_shade->hover_mask;
+    theme->btn_shade->a_focused_pressed->texture[0].data.mask.mask =
+        theme->btn_shade->a_unfocused_pressed->texture[0].data.mask.mask =
+        theme->btn_shade->pressed_mask;
+    theme->btn_shade->a_focused_unpressed->texture[0].data.mask.mask =
+        theme->btn_shade->a_unfocused_unpressed->texture[0].data.mask.mask =
+        theme->btn_shade->mask;
+    theme->btn_shade->a_toggled_hover_focused->texture[0].data.mask.mask =
+        theme->btn_shade->a_toggled_hover_unfocused->texture[0].data.mask.mask =
+        theme->btn_shade->toggled_hover_mask;
+    theme->btn_shade->a_toggled_focused_unpressed->texture[0].data.mask.mask =
+        theme->btn_shade->a_toggled_unfocused_unpressed->texture[0].data.mask.mask =
+        theme->btn_shade->toggled_mask;
+    theme->btn_shade->a_toggled_focused_pressed->texture[0].data.mask.mask =
+        theme->btn_shade->a_toggled_unfocused_pressed->texture[0].data.mask.mask =
+        theme->btn_shade->toggled_pressed_mask;
+    theme->btn_iconify->a_disabled_focused->texture[0].data.mask.mask =
+        theme->btn_iconify->a_disabled_unfocused->texture[0].data.mask.mask =
+        theme->btn_iconify->disabled_mask;
+    theme->btn_iconify->a_hover_focused->texture[0].data.mask.mask =
+        theme->btn_iconify->a_hover_unfocused->texture[0].data.mask.mask =
+        theme->btn_iconify->hover_mask;
+    theme->btn_iconify->a_focused_pressed->texture[0].data.mask.mask =
+        theme->btn_iconify->a_unfocused_pressed->texture[0].data.mask.mask =
+        theme->btn_iconify->pressed_mask;
+    theme->btn_iconify->a_focused_unpressed->texture[0].data.mask.mask =
+        theme->btn_iconify->a_unfocused_unpressed->texture[0].data.mask.mask =
+        theme->btn_iconify->mask;
     theme->a_menu_bullet_normal->texture[0].data.mask.mask =
     theme->a_menu_bullet_selected->texture[0].data.mask.mask =
         theme->menu_bullet_mask;
     theme->a_menu_bullet_normal->texture[0].data.mask.mask =
     theme->a_menu_bullet_selected->texture[0].data.mask.mask =
         theme->menu_bullet_mask;
-    theme->a_disabled_focused_max->texture[0].data.mask.color =
-        theme->a_disabled_focused_close->texture[0].data.mask.color =
-        theme->a_disabled_focused_desk->texture[0].data.mask.color =
-        theme->a_disabled_focused_shade->texture[0].data.mask.color =
-        theme->a_disabled_focused_iconify->texture[0].data.mask.color =
+    theme->btn_max->a_disabled_focused->texture[0].data.mask.color =
+        theme->btn_close->a_disabled_focused->texture[0].data.mask.color =
+        theme->btn_desk->a_disabled_focused->texture[0].data.mask.color =
+        theme->btn_shade->a_disabled_focused->texture[0].data.mask.color =
+        theme->btn_iconify->a_disabled_focused->texture[0].data.mask.color =
         theme->titlebut_disabled_focused_color;
         theme->titlebut_disabled_focused_color;
-    theme->a_disabled_unfocused_max->texture[0].data.mask.color =
-        theme->a_disabled_unfocused_close->texture[0].data.mask.color =
-        theme->a_disabled_unfocused_desk->texture[0].data.mask.color =
-        theme->a_disabled_unfocused_shade->texture[0].data.mask.color =
-        theme->a_disabled_unfocused_iconify->texture[0].data.mask.color =
+    theme->btn_max->a_disabled_unfocused->texture[0].data.mask.color =
+        theme->btn_close->a_disabled_unfocused->texture[0].data.mask.color =
+        theme->btn_desk->a_disabled_unfocused->texture[0].data.mask.color =
+        theme->btn_shade->a_disabled_unfocused->texture[0].data.mask.color =
+        theme->btn_iconify->a_disabled_unfocused->texture[0].data.mask.color =
         theme->titlebut_disabled_unfocused_color;
         theme->titlebut_disabled_unfocused_color;
-    theme->a_hover_focused_max->texture[0].data.mask.color =
-        theme->a_hover_focused_close->texture[0].data.mask.color =
-        theme->a_hover_focused_desk->texture[0].data.mask.color =
-        theme->a_hover_focused_shade->texture[0].data.mask.color =
-        theme->a_hover_focused_iconify->texture[0].data.mask.color =
+    theme->btn_max->a_hover_focused->texture[0].data.mask.color =
+        theme->btn_close->a_hover_focused->texture[0].data.mask.color =
+        theme->btn_desk->a_hover_focused->texture[0].data.mask.color =
+        theme->btn_shade->a_hover_focused->texture[0].data.mask.color =
+        theme->btn_iconify->a_hover_focused->texture[0].data.mask.color =
         theme->titlebut_hover_focused_color;
         theme->titlebut_hover_focused_color;
-    theme->a_hover_unfocused_max->texture[0].data.mask.color =
-        theme->a_hover_unfocused_close->texture[0].data.mask.color =
-        theme->a_hover_unfocused_desk->texture[0].data.mask.color =
-        theme->a_hover_unfocused_shade->texture[0].data.mask.color =
-        theme->a_hover_unfocused_iconify->texture[0].data.mask.color =
+    theme->btn_max->a_hover_unfocused->texture[0].data.mask.color =
+        theme->btn_close->a_hover_unfocused->texture[0].data.mask.color =
+        theme->btn_desk->a_hover_unfocused->texture[0].data.mask.color =
+        theme->btn_shade->a_hover_unfocused->texture[0].data.mask.color =
+        theme->btn_iconify->a_hover_unfocused->texture[0].data.mask.color =
         theme->titlebut_hover_unfocused_color;
         theme->titlebut_hover_unfocused_color;
-    theme->a_toggled_hover_focused_max->texture[0].data.mask.color =
-        theme->a_toggled_hover_focused_desk->texture[0].data.mask.color =
-        theme->a_toggled_hover_focused_shade->texture[0].data.mask.color =
+    theme->btn_max->a_toggled_hover_focused->texture[0].data.mask.color =
+        theme->btn_desk->a_toggled_hover_focused->texture[0].data.mask.color =
+        theme->btn_shade->a_toggled_hover_focused->texture[0].data.mask.color =
         theme->titlebut_toggled_hover_focused_color;
         theme->titlebut_toggled_hover_focused_color;
-    theme->a_toggled_hover_unfocused_max->texture[0].data.mask.color =
-        theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.color =
-        theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.color =
+    theme->btn_max->a_toggled_hover_unfocused->texture[0].data.mask.color =
+        theme->btn_desk->a_toggled_hover_unfocused->texture[0].data.mask.color =
+        theme->btn_shade->a_toggled_hover_unfocused->texture[0].data.mask.color =
         theme->titlebut_toggled_hover_unfocused_color;
         theme->titlebut_toggled_hover_unfocused_color;
-    theme->a_toggled_focused_unpressed_max->texture[0].data.mask.color =
-        theme->a_toggled_focused_unpressed_desk->texture[0].data.mask.color =
-        theme->a_toggled_focused_unpressed_shade->texture[0].data.mask.color =
+    theme->btn_max->a_toggled_focused_unpressed->texture[0].data.mask.color =
+        theme->btn_desk->a_toggled_focused_unpressed->texture[0].data.mask.color =
+        theme->btn_shade->a_toggled_focused_unpressed->texture[0].data.mask.color =
         theme->titlebut_toggled_focused_unpressed_color;
         theme->titlebut_toggled_focused_unpressed_color;
-    theme->a_toggled_unfocused_unpressed_max->texture[0].data.mask.color =
-        theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.color =
-        theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.color=
+    theme->btn_max->a_toggled_unfocused_unpressed->texture[0].data.mask.color =
+        theme->btn_desk->a_toggled_unfocused_unpressed->texture[0].data.mask.color =
+        theme->btn_shade->a_toggled_unfocused_unpressed->texture[0].data.mask.color=
         theme->titlebut_toggled_unfocused_unpressed_color;
         theme->titlebut_toggled_unfocused_unpressed_color;
-    theme->a_toggled_focused_pressed_max->texture[0].data.mask.color =
-        theme->a_toggled_focused_pressed_desk->texture[0].data.mask.color =
-        theme->a_toggled_focused_pressed_shade->texture[0].data.mask.color =
+    theme->btn_max->a_toggled_focused_pressed->texture[0].data.mask.color =
+        theme->btn_desk->a_toggled_focused_pressed->texture[0].data.mask.color =
+        theme->btn_shade->a_toggled_focused_pressed->texture[0].data.mask.color =
         theme->titlebut_toggled_focused_pressed_color;
         theme->titlebut_toggled_focused_pressed_color;
-    theme->a_toggled_unfocused_pressed_max->texture[0].data.mask.color =
-        theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.color =
-        theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.color =
+    theme->btn_max->a_toggled_unfocused_pressed->texture[0].data.mask.color =
+        theme->btn_desk->a_toggled_unfocused_pressed->texture[0].data.mask.color =
+        theme->btn_shade->a_toggled_unfocused_pressed->texture[0].data.mask.color =
         theme->titlebut_toggled_unfocused_pressed_color;
         theme->titlebut_toggled_unfocused_pressed_color;
-    theme->a_focused_unpressed_max->texture[0].data.mask.color =
-        theme->a_focused_unpressed_close->texture[0].data.mask.color =
-        theme->a_focused_unpressed_desk->texture[0].data.mask.color =
-        theme->a_focused_unpressed_shade->texture[0].data.mask.color =
-        theme->a_focused_unpressed_iconify->texture[0].data.mask.color =
+    theme->btn_max->a_focused_unpressed->texture[0].data.mask.color =
+        theme->btn_close->a_focused_unpressed->texture[0].data.mask.color =
+        theme->btn_desk->a_focused_unpressed->texture[0].data.mask.color =
+        theme->btn_shade->a_focused_unpressed->texture[0].data.mask.color =
+        theme->btn_iconify->a_focused_unpressed->texture[0].data.mask.color =
         theme->titlebut_focused_unpressed_color;
         theme->titlebut_focused_unpressed_color;
-    theme->a_focused_pressed_max->texture[0].data.mask.color =
-        theme->a_focused_pressed_close->texture[0].data.mask.color =
-        theme->a_focused_pressed_desk->texture[0].data.mask.color =
-        theme->a_focused_pressed_shade->texture[0].data.mask.color =
-        theme->a_focused_pressed_iconify->texture[0].data.mask.color =
+    theme->btn_max->a_focused_pressed->texture[0].data.mask.color =
+        theme->btn_close->a_focused_pressed->texture[0].data.mask.color =
+        theme->btn_desk->a_focused_pressed->texture[0].data.mask.color =
+        theme->btn_shade->a_focused_pressed->texture[0].data.mask.color =
+        theme->btn_iconify->a_focused_pressed->texture[0].data.mask.color =
         theme->titlebut_focused_pressed_color;
         theme->titlebut_focused_pressed_color;
-    theme->a_unfocused_unpressed_max->texture[0].data.mask.color =
-        theme->a_unfocused_unpressed_close->texture[0].data.mask.color =
-        theme->a_unfocused_unpressed_desk->texture[0].data.mask.color =
-        theme->a_unfocused_unpressed_shade->texture[0].data.mask.color =
-        theme->a_unfocused_unpressed_iconify->texture[0].data.mask.color =
+    theme->btn_max->a_unfocused_unpressed->texture[0].data.mask.color =
+        theme->btn_close->a_unfocused_unpressed->texture[0].data.mask.color =
+        theme->btn_desk->a_unfocused_unpressed->texture[0].data.mask.color =
+        theme->btn_shade->a_unfocused_unpressed->texture[0].data.mask.color =
+        theme->btn_iconify->a_unfocused_unpressed->texture[0].data.mask.color =
         theme->titlebut_unfocused_unpressed_color;
         theme->titlebut_unfocused_unpressed_color;
-    theme->a_unfocused_pressed_max->texture[0].data.mask.color =
-        theme->a_unfocused_pressed_close->texture[0].data.mask.color =
-        theme->a_unfocused_pressed_desk->texture[0].data.mask.color =
-        theme->a_unfocused_pressed_shade->texture[0].data.mask.color =
-        theme->a_unfocused_pressed_iconify->texture[0].data.mask.color =
+    theme->btn_max->a_unfocused_pressed->texture[0].data.mask.color =
+        theme->btn_close->a_unfocused_pressed->texture[0].data.mask.color =
+        theme->btn_desk->a_unfocused_pressed->texture[0].data.mask.color =
+        theme->btn_shade->a_unfocused_pressed->texture[0].data.mask.color =
+        theme->btn_iconify->a_unfocused_pressed->texture[0].data.mask.color =
         theme->titlebut_unfocused_pressed_color;
     theme->a_menu_bullet_normal->texture[0].data.mask.color =
         theme->menu_color;
         theme->titlebut_unfocused_pressed_color;
     theme->a_menu_bullet_normal->texture[0].data.mask.color =
         theme->menu_color;
@@ -1478,6 +1478,12 @@ void RrThemeFree(RrTheme *theme)
     if (theme) {
         g_free(theme->name);
 
     if (theme) {
         g_free(theme->name);
 
+        RrButtonFree(theme->btn_max);
+        RrButtonFree(theme->btn_close);
+        RrButtonFree(theme->btn_desk);
+        RrButtonFree(theme->btn_shade);
+        RrButtonFree(theme->btn_iconify);
+
         RrColorFree(theme->menu_border_color);
         RrColorFree(theme->osd_border_color);
         RrColorFree(theme->frame_focused_border_color);
         RrColorFree(theme->menu_border_color);
         RrColorFree(theme->osd_border_color);
         RrColorFree(theme->frame_focused_border_color);
@@ -1521,36 +1527,7 @@ void RrThemeFree(RrTheme *theme)
         RrColorFree(theme->menu_text_disabled_selected_shadow_color);
 
         g_free(theme->def_win_icon);
         RrColorFree(theme->menu_text_disabled_selected_shadow_color);
 
         g_free(theme->def_win_icon);
-
-        RrPixmapMaskFree(theme->max_mask);
-        RrPixmapMaskFree(theme->max_toggled_mask);
-        RrPixmapMaskFree(theme->max_toggled_hover_mask);
-        RrPixmapMaskFree(theme->max_toggled_pressed_mask);
-        RrPixmapMaskFree(theme->max_disabled_mask);
-        RrPixmapMaskFree(theme->max_hover_mask);
-        RrPixmapMaskFree(theme->max_pressed_mask);
-        RrPixmapMaskFree(theme->desk_mask);
-        RrPixmapMaskFree(theme->desk_toggled_mask);
-        RrPixmapMaskFree(theme->desk_toggled_hover_mask);
-        RrPixmapMaskFree(theme->desk_toggled_pressed_mask);
-        RrPixmapMaskFree(theme->desk_disabled_mask);
-        RrPixmapMaskFree(theme->desk_hover_mask);
-        RrPixmapMaskFree(theme->desk_pressed_mask);
-        RrPixmapMaskFree(theme->shade_mask);
-        RrPixmapMaskFree(theme->shade_toggled_mask);
-        RrPixmapMaskFree(theme->shade_toggled_hover_mask);
-        RrPixmapMaskFree(theme->shade_toggled_pressed_mask);
-        RrPixmapMaskFree(theme->shade_disabled_mask);
-        RrPixmapMaskFree(theme->shade_hover_mask);
-        RrPixmapMaskFree(theme->shade_pressed_mask);
-        RrPixmapMaskFree(theme->iconify_mask);
-        RrPixmapMaskFree(theme->iconify_disabled_mask);
-        RrPixmapMaskFree(theme->iconify_hover_mask);
-        RrPixmapMaskFree(theme->iconify_pressed_mask);
-        RrPixmapMaskFree(theme->close_mask);
-        RrPixmapMaskFree(theme->close_disabled_mask);
-        RrPixmapMaskFree(theme->close_hover_mask);
-        RrPixmapMaskFree(theme->close_pressed_mask);
+        
         RrPixmapMaskFree(theme->menu_bullet_mask);
         RrPixmapMaskFree(theme->down_arrow_mask);
         RrPixmapMaskFree(theme->up_arrow_mask);
         RrPixmapMaskFree(theme->menu_bullet_mask);
         RrPixmapMaskFree(theme->down_arrow_mask);
         RrPixmapMaskFree(theme->up_arrow_mask);
index fd2549c..cf41ded 100644 (file)
@@ -400,11 +400,11 @@ void client_menu_startup(void)
     menu_add_normal(menu, CLIENT_RESIZE, _("Resi_ze"), NULL, TRUE);
 
     e = menu_add_normal(menu, CLIENT_ICONIFY, _("Ico_nify"), NULL, TRUE);
     menu_add_normal(menu, CLIENT_RESIZE, _("Resi_ze"), NULL, TRUE);
 
     e = menu_add_normal(menu, CLIENT_ICONIFY, _("Ico_nify"), NULL, TRUE);
-    e->data.normal.mask = ob_rr_theme->iconify_mask;
+    e->data.normal.mask = ob_rr_theme->btn_iconify->mask;
     set_icon_color(e);
 
     e = menu_add_normal(menu, CLIENT_MAXIMIZE, _("Ma_ximize"), NULL, TRUE);
     set_icon_color(e);
 
     e = menu_add_normal(menu, CLIENT_MAXIMIZE, _("Ma_ximize"), NULL, TRUE);
-    e->data.normal.mask = ob_rr_theme->max_mask;
+    e->data.normal.mask = ob_rr_theme->btn_max->mask;
     set_icon_color(e);
 
     e = menu_add_normal(menu, CLIENT_SHADE, _("_Roll up/down"), NULL, TRUE);
     set_icon_color(e);
 
     e = menu_add_normal(menu, CLIENT_SHADE, _("_Roll up/down"), NULL, TRUE);
@@ -416,6 +416,6 @@ void client_menu_startup(void)
     menu_add_separator(menu, -1, NULL);
 
     e = menu_add_normal(menu, CLIENT_CLOSE, _("_Close"), NULL, TRUE);
     menu_add_separator(menu, -1, NULL);
 
     e = menu_add_normal(menu, CLIENT_CLOSE, _("_Close"), NULL, TRUE);
-    e->data.normal.mask = ob_rr_theme->close_mask;
+    e->data.normal.mask = ob_rr_theme->btn_close->mask;
     set_icon_color(e);
 }
     set_icon_color(e);
 }
index 28c12ae..8ddba60 100644 (file)
@@ -127,116 +127,116 @@ void framerender_frame(ObFrame *self)
             t = ob_rr_theme->a_focused_title;
             l = ob_rr_theme->a_focused_label;
             m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ?
             t = ob_rr_theme->a_focused_title;
             l = ob_rr_theme->a_focused_label;
             m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ?
-                 ob_rr_theme->a_disabled_focused_max :
+                 ob_rr_theme->btn_max->a_disabled_focused :
                  (self->client->max_vert || self->client->max_horz ?
                   (self->max_press ?
                  (self->client->max_vert || self->client->max_horz ?
                   (self->max_press ?
-                   ob_rr_theme->a_toggled_focused_pressed_max :
+                   ob_rr_theme->btn_max->a_toggled_focused_pressed :
                    (self->max_hover ?
                    (self->max_hover ?
-                    ob_rr_theme->a_toggled_hover_focused_max :
-                    ob_rr_theme->a_toggled_focused_unpressed_max)) :
+                    ob_rr_theme->btn_max->a_toggled_hover_focused :
+                    ob_rr_theme->btn_max->a_toggled_focused_unpressed)) :
                   (self->max_press ?
                   (self->max_press ?
-                   ob_rr_theme->a_focused_pressed_max :
+                   ob_rr_theme->btn_max->a_focused_pressed :
                    (self->max_hover ?
                    (self->max_hover ?
-                    ob_rr_theme->a_hover_focused_max :
-                    ob_rr_theme->a_focused_unpressed_max))));
+                    ob_rr_theme->btn_max->a_hover_focused :
+                    ob_rr_theme->btn_max->a_focused_unpressed))));
             n = ob_rr_theme->a_icon;
             i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ?
             n = ob_rr_theme->a_icon;
             i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ?
-                 ob_rr_theme->a_disabled_focused_iconify :
+                 ob_rr_theme->btn_iconify->a_disabled_focused :
                  (self->iconify_press ?
                  (self->iconify_press ?
-                  ob_rr_theme->a_focused_pressed_iconify :
+                  ob_rr_theme->btn_iconify->a_focused_pressed :
                   (self->iconify_hover ?
                   (self->iconify_hover ?
-                   ob_rr_theme->a_hover_focused_iconify :
-                   ob_rr_theme->a_focused_unpressed_iconify)));
+                   ob_rr_theme->btn_iconify->a_hover_focused :
+                   ob_rr_theme->btn_iconify->a_focused_unpressed)));
             d = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ?
             d = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ?
-                 ob_rr_theme->a_disabled_focused_desk :
+                 ob_rr_theme->btn_desk->a_disabled_focused :
                  (self->client->desktop == DESKTOP_ALL ?
                   (self->desk_press ?
                  (self->client->desktop == DESKTOP_ALL ?
                   (self->desk_press ?
-                   ob_rr_theme->a_toggled_focused_pressed_desk :
+                   ob_rr_theme->btn_desk->a_toggled_focused_pressed :
                    (self->desk_hover ?
                    (self->desk_hover ?
-                    ob_rr_theme->a_toggled_hover_focused_desk :
-                    ob_rr_theme->a_toggled_focused_unpressed_desk)) :
+                    ob_rr_theme->btn_desk->a_toggled_hover_focused :
+                    ob_rr_theme->btn_desk->a_toggled_focused_unpressed)) :
                   (self->desk_press ?
                   (self->desk_press ?
-                   ob_rr_theme->a_focused_pressed_desk :
+                   ob_rr_theme->btn_desk->a_focused_pressed :
                    (self->desk_hover ?
                    (self->desk_hover ?
-                    ob_rr_theme->a_hover_focused_desk :
-                    ob_rr_theme->a_focused_unpressed_desk))));
+                    ob_rr_theme->btn_desk->a_hover_focused :
+                    ob_rr_theme->btn_desk->a_focused_unpressed))));
             s = (!(self->decorations & OB_FRAME_DECOR_SHADE) ?
             s = (!(self->decorations & OB_FRAME_DECOR_SHADE) ?
-                 ob_rr_theme->a_disabled_focused_shade :
+                 ob_rr_theme->btn_shade->a_disabled_focused :
                  (self->client->shaded ?
                   (self->shade_press ?
                  (self->client->shaded ?
                   (self->shade_press ?
-                   ob_rr_theme->a_toggled_focused_pressed_shade :
+                   ob_rr_theme->btn_shade->a_toggled_focused_pressed :
                    (self->shade_hover ?
                    (self->shade_hover ?
-                    ob_rr_theme->a_toggled_hover_focused_shade :
-                    ob_rr_theme->a_toggled_focused_unpressed_shade)) :
+                    ob_rr_theme->btn_shade->a_toggled_hover_focused :
+                    ob_rr_theme->btn_shade->a_toggled_focused_unpressed)) :
                   (self->shade_press ?
                   (self->shade_press ?
-                   ob_rr_theme->a_focused_pressed_shade :
+                   ob_rr_theme->btn_shade->a_focused_pressed :
                    (self->shade_hover ?
                    (self->shade_hover ?
-                    ob_rr_theme->a_hover_focused_shade :
-                    ob_rr_theme->a_focused_unpressed_shade))));
+                    ob_rr_theme->btn_shade->a_hover_focused :
+                    ob_rr_theme->btn_shade->a_focused_unpressed))));
             c = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ?
             c = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ?
-                 ob_rr_theme->a_disabled_focused_close :
+                 ob_rr_theme->btn_close->a_disabled_focused :
                  (self->close_press ?
                  (self->close_press ?
-                  ob_rr_theme->a_focused_pressed_close :
+                  ob_rr_theme->btn_close->a_focused_pressed :
                   (self->close_hover ?
                   (self->close_hover ?
-                   ob_rr_theme->a_hover_focused_close :
-                   ob_rr_theme->a_focused_unpressed_close)));
+                   ob_rr_theme->btn_close->a_hover_focused :
+                   ob_rr_theme->btn_close->a_focused_unpressed)));
         } else {
             t = ob_rr_theme->a_unfocused_title;
             l = ob_rr_theme->a_unfocused_label;
             m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ?
         } else {
             t = ob_rr_theme->a_unfocused_title;
             l = ob_rr_theme->a_unfocused_label;
             m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ?
-                 ob_rr_theme->a_disabled_unfocused_max :
+                 ob_rr_theme->btn_max->a_disabled_unfocused :
                  (self->client->max_vert || self->client->max_horz ?
                   (self->max_press ?
                  (self->client->max_vert || self->client->max_horz ?
                   (self->max_press ?
-                   ob_rr_theme->a_toggled_unfocused_pressed_max :
+                   ob_rr_theme->btn_max->a_toggled_unfocused_pressed :
                    (self->max_hover ?
                    (self->max_hover ?
-                    ob_rr_theme->a_toggled_hover_unfocused_max :
-                    ob_rr_theme->a_toggled_unfocused_unpressed_max)) :
+                    ob_rr_theme->btn_max->a_toggled_hover_unfocused :
+                    ob_rr_theme->btn_max->a_toggled_unfocused_unpressed)) :
                   (self->max_press ?
                   (self->max_press ?
-                   ob_rr_theme->a_unfocused_pressed_max :
+                   ob_rr_theme->btn_max->a_unfocused_pressed :
                    (self->max_hover ?
                    (self->max_hover ?
-                    ob_rr_theme->a_hover_unfocused_max :
-                    ob_rr_theme->a_unfocused_unpressed_max))));
+                    ob_rr_theme->btn_max->a_hover_unfocused :
+                    ob_rr_theme->btn_max->a_unfocused_unpressed))));
             n = ob_rr_theme->a_icon;
             i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ?
             n = ob_rr_theme->a_icon;
             i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ?
-                 ob_rr_theme->a_disabled_unfocused_iconify :
+                 ob_rr_theme->btn_iconify->a_disabled_unfocused :
                  (self->iconify_press ?
                  (self->iconify_press ?
-                  ob_rr_theme->a_unfocused_pressed_iconify :
+                  ob_rr_theme->btn_iconify->a_unfocused_pressed :
                   (self->iconify_hover ?
                   (self->iconify_hover ?
-                   ob_rr_theme->a_hover_unfocused_iconify :
-                   ob_rr_theme->a_unfocused_unpressed_iconify)));
+                   ob_rr_theme->btn_iconify->a_hover_unfocused :
+                   ob_rr_theme->btn_iconify->a_unfocused_unpressed)));
             d = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ?
             d = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ?
-                 ob_rr_theme->a_disabled_unfocused_desk :
+                 ob_rr_theme->btn_desk->a_disabled_unfocused :
                  (self->client->desktop == DESKTOP_ALL ?
                   (self->desk_press ?
                  (self->client->desktop == DESKTOP_ALL ?
                   (self->desk_press ?
-                   ob_rr_theme->a_toggled_unfocused_pressed_desk :
+                   ob_rr_theme->btn_desk->a_toggled_unfocused_pressed :
                    (self->desk_hover ?
                    (self->desk_hover ?
-                    ob_rr_theme->a_toggled_hover_unfocused_desk :
-                    ob_rr_theme->a_toggled_unfocused_unpressed_desk)) :
+                    ob_rr_theme->btn_desk->a_toggled_hover_unfocused :
+                    ob_rr_theme->btn_desk->a_toggled_unfocused_unpressed)) :
                   (self->desk_press ?
                   (self->desk_press ?
-                   ob_rr_theme->a_unfocused_pressed_desk :
+                   ob_rr_theme->btn_desk->a_unfocused_pressed :
                    (self->desk_hover ?
                    (self->desk_hover ?
-                    ob_rr_theme->a_hover_unfocused_desk :
-                    ob_rr_theme->a_unfocused_unpressed_desk))));
+                    ob_rr_theme->btn_desk->a_hover_unfocused :
+                    ob_rr_theme->btn_desk->a_unfocused_unpressed))));
             s = (!(self->decorations & OB_FRAME_DECOR_SHADE) ?
             s = (!(self->decorations & OB_FRAME_DECOR_SHADE) ?
-                 ob_rr_theme->a_disabled_unfocused_shade :
+                 ob_rr_theme->btn_shade->a_disabled_unfocused :
                  (self->client->shaded ?
                   (self->shade_press ?
                  (self->client->shaded ?
                   (self->shade_press ?
-                   ob_rr_theme->a_toggled_unfocused_pressed_shade :
+                   ob_rr_theme->btn_shade->a_toggled_unfocused_pressed :
                    (self->shade_hover ?
                    (self->shade_hover ?
-                    ob_rr_theme->a_toggled_hover_unfocused_shade :
-                    ob_rr_theme->a_toggled_unfocused_unpressed_shade)) :
+                    ob_rr_theme->btn_shade->a_toggled_hover_unfocused :
+                    ob_rr_theme->btn_shade->a_toggled_unfocused_unpressed)) :
                   (self->shade_press ?
                   (self->shade_press ?
-                   ob_rr_theme->a_unfocused_pressed_shade :
+                   ob_rr_theme->btn_shade->a_unfocused_pressed :
                    (self->shade_hover ?
                    (self->shade_hover ?
-                    ob_rr_theme->a_hover_unfocused_shade :
-                    ob_rr_theme->a_unfocused_unpressed_shade))));
+                    ob_rr_theme->btn_shade->a_hover_unfocused :
+                    ob_rr_theme->btn_shade->a_unfocused_unpressed))));
             c = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ?
             c = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ?
-                 ob_rr_theme->a_disabled_unfocused_close :
+                 ob_rr_theme->btn_close->a_disabled_unfocused :
                  (self->close_press ?
                  (self->close_press ?
-                  ob_rr_theme->a_unfocused_pressed_close :
+                  ob_rr_theme->btn_close->a_unfocused_pressed :
                   (self->close_hover ?
                   (self->close_hover ?
-                   ob_rr_theme->a_hover_unfocused_close :
-                   ob_rr_theme->a_unfocused_unpressed_close)));
+                   ob_rr_theme->btn_close->a_hover_unfocused :
+                   ob_rr_theme->btn_close->a_unfocused_unpressed)));
         }
         clear = ob_rr_theme->a_clear;
 
         }
         clear = ob_rr_theme->a_clear;