Buttons seem to work!
authorDave Foster <daf@minuslab.net>
Wed, 12 Dec 2007 23:02:38 +0000 (18:02 -0500)
committerMikael Magnusson <mikachu@comhem.se>
Sat, 12 Jan 2008 03:00:20 +0000 (04:00 +0100)
openbox/client_menu.c
openbox/framerender.c
render/button.h
render/render.h
render/theme.c

index cf556744a35d0fca46910cab7623d5d28cca6b78..ee0d067c31eaf6e0f1860901e774f787bdee86ea 100644 (file)
@@ -262,7 +262,7 @@ static gboolean send_to_menu_update(ObMenuFrame *frame, gpointer data)
         e = menu_add_normal(menu, desk, name, NULL, FALSE);
         e->id = desk;
         if (desk == DESKTOP_ALL) {
-            e->data.normal.mask = ob_rr_theme->desk_mask;
+            e->data.normal.mask = ob_rr_theme->btn_desk->mask;
             e->data.normal.mask_normal_color = ob_rr_theme->menu_color;
             e->data.normal.mask_selected_color =
                 ob_rr_theme->menu_selected_color;
@@ -382,7 +382,7 @@ void client_menu_startup(void)
     menu_add_submenu(menu, CLIENT_LAYER, LAYER_MENU_NAME);
 
     e = menu_add_normal(menu, CLIENT_RESTORE, _("R_estore"), NULL, TRUE);
-    e->data.normal.mask = ob_rr_theme->max_toggled_mask;
+    e->data.normal.mask = ob_rr_theme->btn_max->toggled_mask;
     e->data.normal.mask_normal_color = ob_rr_theme->menu_color;
     e->data.normal.mask_selected_color = ob_rr_theme->menu_selected_color;
     e->data.normal.mask_disabled_color = ob_rr_theme->menu_disabled_color;
@@ -394,7 +394,7 @@ 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);
-    e->data.normal.mask = ob_rr_theme->iconify_mask;
+    e->data.normal.mask = ob_rr_theme->btn_iconify->mask;
     e->data.normal.mask_normal_color = ob_rr_theme->menu_color;
     e->data.normal.mask_selected_color = ob_rr_theme->menu_selected_color;
     e->data.normal.mask_disabled_color = ob_rr_theme->menu_disabled_color;
@@ -402,7 +402,7 @@ void client_menu_startup(void)
         ob_rr_theme->menu_disabled_selected_color;
 
     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;
     e->data.normal.mask_normal_color = ob_rr_theme->menu_color;
     e->data.normal.mask_selected_color = ob_rr_theme->menu_selected_color;
     e->data.normal.mask_disabled_color = ob_rr_theme->menu_disabled_color;
@@ -416,7 +416,7 @@ void client_menu_startup(void)
     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;
     e->data.normal.mask_normal_color = ob_rr_theme->menu_color;
     e->data.normal.mask_selected_color = ob_rr_theme->menu_selected_color;
     e->data.normal.mask_disabled_color = ob_rr_theme->menu_disabled_color;
index af6be016565332c88aac3a8f7a424db4321a4a83..57425059c2f4d25129c388cf888b8b06ba68b82e 100644 (file)
@@ -129,116 +129,116 @@ void framerender_frame(ObFrame *self)
             l = self->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 ?
-                   ob_rr_theme->a_toggled_focused_pressed_max :
+                   ob_rr_theme->btn_max->a_toggled_focused_pressed :
                    (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 ?
-                   ob_rr_theme->a_focused_pressed_max :
+                   ob_rr_theme->btn_max->a_focused_pressed :
                    (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 = self->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 ?
-                  ob_rr_theme->a_focused_pressed_iconify :
+                  ob_rr_theme->btn_iconify->a_focused_pressed :
                   (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) ?
-                 ob_rr_theme->a_disabled_focused_desk :
+                 ob_rr_theme->btn_desk->a_disabled_focused :
                  (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 ?
-                    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 ?
-                   ob_rr_theme->a_focused_pressed_desk :
+                   ob_rr_theme->btn_desk->a_focused_pressed :
                    (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) ?
-                 ob_rr_theme->a_disabled_focused_shade :
+                 ob_rr_theme->btn_shade->a_disabled_focused :
                  (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 ?
-                    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 ?
-                   ob_rr_theme->a_focused_pressed_shade :
+                   ob_rr_theme->btn_shade->a_focused_pressed :
                    (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) ?
-                 ob_rr_theme->a_disabled_focused_close :
+                 ob_rr_theme->btn_close->a_disabled_focused :
                  (self->close_press ?
-                  ob_rr_theme->a_focused_pressed_close :
+                  ob_rr_theme->btn_close->a_focused_pressed :
                   (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 = self->a_unfocused_title;
             l = self->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 ?
-                   ob_rr_theme->a_toggled_unfocused_pressed_max :
+                   ob_rr_theme->btn_max->a_toggled_unfocused_pressed :
                    (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 ?
-                   ob_rr_theme->a_unfocused_pressed_max :
+                   ob_rr_theme->btn_max->a_unfocused_pressed :
                    (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 = self->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 ?
-                  ob_rr_theme->a_unfocused_pressed_iconify :
+                  ob_rr_theme->btn_iconify->a_unfocused_pressed :
                   (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) ?
-                 ob_rr_theme->a_disabled_unfocused_desk :
+                 ob_rr_theme->btn_desk->a_disabled_unfocused :
                  (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 ?
-                    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 ?
-                   ob_rr_theme->a_unfocused_pressed_desk :
+                   ob_rr_theme->btn_desk->a_unfocused_pressed :
                    (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) ?
-                 ob_rr_theme->a_disabled_unfocused_shade :
+                 ob_rr_theme->btn_shade->a_disabled_unfocused :
                  (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 ?
-                    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 ?
-                   ob_rr_theme->a_unfocused_pressed_shade :
+                   ob_rr_theme->btn_shade->a_unfocused_pressed :
                    (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) ?
-                 ob_rr_theme->a_disabled_unfocused_close :
+                 ob_rr_theme->btn_close->a_disabled_unfocused :
                  (self->close_press ?
-                  ob_rr_theme->a_unfocused_pressed_close :
+                  ob_rr_theme->btn_close->a_unfocused_pressed :
                   (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;
 
index 59d04f944c006416061e2c505c5f8d3a2a8f443d..659c3ea93c16b9721d8325ad6f71a5ece3b30846 100644 (file)
@@ -7,50 +7,5 @@
 #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 */
index c70f8cd21946015d7a958fa0bdaf2df60008da39..3ae88d66e946551c40df2d698eadff765d464970 100644 (file)
@@ -201,6 +201,52 @@ struct _RrAppearance {
     gint w, 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;
+
+};
+
 /* 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 bb1b813f819c1f1f3703fbc45165a15bd81faf0e..191c676567ec6bad50fbc855e9b7c17f488720d9 100644 (file)
@@ -688,7 +688,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,
-                         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);
@@ -1074,228 +1074,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_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_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_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->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->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->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->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->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->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->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->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->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->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->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->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->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;
@@ -1374,6 +1374,12 @@ void RrThemeFree(RrTheme *theme)
     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);
@@ -1414,101 +1420,14 @@ void RrThemeFree(RrTheme *theme)
         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);
 
         RrFontClose(theme->win_font_focused);
         RrFontClose(theme->win_font_unfocused);
         RrFontClose(theme->menu_title_font);
         RrFontClose(theme->menu_font);
-
-        RrAppearanceFree(theme->a_disabled_focused_max);
-        RrAppearanceFree(theme->a_disabled_unfocused_max);
-        RrAppearanceFree(theme->a_hover_focused_max);
-        RrAppearanceFree(theme->a_hover_unfocused_max);
-        RrAppearanceFree(theme->a_toggled_hover_focused_max);
-        RrAppearanceFree(theme->a_toggled_hover_unfocused_max);
-        RrAppearanceFree(theme->a_toggled_focused_unpressed_max);
-        RrAppearanceFree(theme->a_toggled_focused_pressed_max);
-        RrAppearanceFree(theme->a_toggled_unfocused_unpressed_max);
-        RrAppearanceFree(theme->a_toggled_unfocused_pressed_max);
-        RrAppearanceFree(theme->a_focused_unpressed_max);
-        RrAppearanceFree(theme->a_focused_pressed_max);
-        RrAppearanceFree(theme->a_unfocused_unpressed_max);
-        RrAppearanceFree(theme->a_unfocused_pressed_max);
-        RrAppearanceFree(theme->a_disabled_focused_close);
-        RrAppearanceFree(theme->a_disabled_unfocused_close);
-        RrAppearanceFree(theme->a_hover_focused_close);
-        RrAppearanceFree(theme->a_hover_unfocused_close);
-        RrAppearanceFree(theme->a_focused_unpressed_close);
-        RrAppearanceFree(theme->a_focused_pressed_close);
-        RrAppearanceFree(theme->a_unfocused_unpressed_close);
-        RrAppearanceFree(theme->a_unfocused_pressed_close);
-        RrAppearanceFree(theme->a_disabled_focused_desk);
-        RrAppearanceFree(theme->a_disabled_unfocused_desk);
-        RrAppearanceFree(theme->a_hover_focused_desk);
-        RrAppearanceFree(theme->a_hover_unfocused_desk);
-        RrAppearanceFree(theme->a_toggled_hover_focused_desk);
-        RrAppearanceFree(theme->a_toggled_hover_unfocused_desk);
-        RrAppearanceFree(theme->a_toggled_focused_unpressed_desk);
-        RrAppearanceFree(theme->a_toggled_focused_pressed_desk);
-        RrAppearanceFree(theme->a_toggled_unfocused_unpressed_desk);
-        RrAppearanceFree(theme->a_toggled_unfocused_pressed_desk);
-        RrAppearanceFree(theme->a_focused_unpressed_desk);
-        RrAppearanceFree(theme->a_focused_pressed_desk);
-        RrAppearanceFree(theme->a_unfocused_unpressed_desk);
-        RrAppearanceFree(theme->a_unfocused_pressed_desk);
-        RrAppearanceFree(theme->a_disabled_focused_shade);
-        RrAppearanceFree(theme->a_disabled_unfocused_shade);
-        RrAppearanceFree(theme->a_hover_focused_shade);
-        RrAppearanceFree(theme->a_hover_unfocused_shade);
-        RrAppearanceFree(theme->a_toggled_hover_focused_shade);
-        RrAppearanceFree(theme->a_toggled_hover_unfocused_shade);
-        RrAppearanceFree(theme->a_toggled_focused_unpressed_shade);
-        RrAppearanceFree(theme->a_toggled_focused_pressed_shade);
-        RrAppearanceFree(theme->a_toggled_unfocused_unpressed_shade);
-        RrAppearanceFree(theme->a_toggled_unfocused_pressed_shade);
-        RrAppearanceFree(theme->a_focused_unpressed_shade);
-        RrAppearanceFree(theme->a_focused_pressed_shade);
-        RrAppearanceFree(theme->a_unfocused_unpressed_shade);
-        RrAppearanceFree(theme->a_unfocused_pressed_shade);
-        RrAppearanceFree(theme->a_disabled_focused_iconify);
-        RrAppearanceFree(theme->a_disabled_unfocused_iconify);
-        RrAppearanceFree(theme->a_hover_focused_iconify);
-        RrAppearanceFree(theme->a_hover_unfocused_iconify);
-        RrAppearanceFree(theme->a_focused_unpressed_iconify);
-        RrAppearanceFree(theme->a_focused_pressed_iconify);
-        RrAppearanceFree(theme->a_unfocused_unpressed_iconify);
-        RrAppearanceFree(theme->a_unfocused_pressed_iconify);
+        
         RrAppearanceFree(theme->a_focused_grip);
         RrAppearanceFree(theme->a_unfocused_grip);
         RrAppearanceFree(theme->a_focused_title);