* Some more 2.5 theme updates
authorMatt Ebb <matt@mke3.net>
Mon, 9 Feb 2009 02:54:40 +0000 (02:54 +0000)
committerMatt Ebb <matt@mke3.net>
Mon, 9 Feb 2009 02:54:40 +0000 (02:54 +0000)
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/resources.c

index 6fc392b0968737347e2e5338eb222ea93d6472c6..f516d953bc575f00ee6b7f3ebf15138596169f2c 100644 (file)
@@ -84,6 +84,7 @@ typedef struct uiPopupBlockHandle uiPopupBlockHandle;
 #define UI_BLOCK_NO_HILITE             64              /* XXX 2.5 not implemented */
 #define UI_BLOCK_MOVEMOUSE_QUIT        128
 #define UI_BLOCK_KEEP_OPEN             256
+#define UI_BLOCK_POPUP                 512
 
 /* uiPopupBlockHandle->menuretval */
 #define UI_RETURN_CANCEL       1       /* cancel all menus cascading */
index db9f621c1fda94a52e12a2f5eb542a897ea51883..26a15bc05c983f4f19cf452976855a4e8d707bc4 100644 (file)
@@ -2163,7 +2163,12 @@ void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag, s
        UI_GetThemeColor4ubv(TH_MENU_BACK, col);
        
        if (rounded) {
-               if (direction == UI_DOWN) {
+               if (flag & UI_BLOCK_POPUP) {
+                       uiSetRoundBox(15);
+                       miny -= 4.0;
+                       maxy += 4.0;
+               }
+               else if (direction == UI_DOWN) {
                        uiSetRoundBox(12);
                        miny -= 4.0;
                } else if (direction == UI_TOP) {
index 71eb9782e52e2e40ba8c662a0861d486bbd4ad35..f5f5a98129d17f6fa3624467efc5853725bda142 100644 (file)
@@ -682,6 +682,7 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut
                saferct= MEM_callocN(sizeof(uiSafetyRct), "uiSafetyRct");
                saferct->safety= block->safety;
                BLI_addhead(&block->saferct, saferct);
+               block->flag |= UI_BLOCK_POPUP;
        }
 
        /* the block and buttons were positioned in window space as in 2.4x, now
index 8b320de82574ce339e205cf0f8c3901c3e82a674..33e738cfc68378439063fde01a4d0515c6483728 100644 (file)
@@ -439,19 +439,19 @@ void ui_theme_init_userdef(void)
        SETCOL(btheme->tipo.back,       120, 120, 120, 255);
        SETCOL(btheme->tipo.header, 195, 195, 195, 255);
        SETCOL(btheme->tipo.panel,  255, 255, 255, 150);
-       SETCOL(btheme->tipo.shade1,  172, 172, 172, 100);
-       SETCOL(btheme->tipo.shade2,  0x70, 0x70, 0x70, 100);
-       SETCOL(btheme->tipo.vertex, 0xff, 0x70, 0xff, 255);
-       SETCOL(btheme->tipo.vertex_select, 0xff, 0xff, 0x70, 255);
+       SETCOL(btheme->tipo.shade1,             172, 172, 172, 100);
+       SETCOL(btheme->tipo.shade2,             0x70, 0x70, 0x70, 100);
+       SETCOL(btheme->tipo.vertex,             0, 0, 0, 255);
+       SETCOL(btheme->tipo.vertex_select, 255, 133, 0, 255);
        SETCOL(btheme->tipo.hilite, 0x60, 0xc0, 0x40, 255); 
        btheme->tipo.vertex_size= 3;
 
-       SETCOL(btheme->tipo.handle_vertex, 0xff, 0x70, 0xff, 255);
-       SETCOL(btheme->tipo.handle_vertex_select, 0xff, 0xff, 0x70, 255);
+       SETCOL(btheme->tipo.handle_vertex,              0, 0, 0, 255);
+       SETCOL(btheme->tipo.handle_vertex_select, 255, 133, 0, 255);
        btheme->tipo.handle_vertex_size= 3;
        
-       SETCOL(btheme->tipo.ds_channel, 0x36, 0x13, 0xca, 255);
-       SETCOL(btheme->tipo.ds_subchannel, 0x60, 0x43, 0xd2, 255);
+       SETCOL(btheme->tipo.ds_channel,         82, 96, 110, 255);
+       SETCOL(btheme->tipo.ds_subchannel,      124, 137, 150, 255);
 
        /* space file */
        /* to have something initialized */
@@ -478,8 +478,8 @@ void ui_theme_init_userdef(void)
        SETCOL(btheme->tact.strip, 78, 78, 78, 255);
        SETCOL(btheme->tact.group, 22, 112, 0, 255);
        SETCOL(btheme->tact.group_active, 125, 233, 96, 255);
-       SETCOL(btheme->tact.ds_channel, 0x36, 0x13, 0xca, 255);
-       SETCOL(btheme->tact.ds_subchannel, 0x60, 0x43, 0xd2, 255);
+       SETCOL(btheme->tact.ds_channel, 82, 96, 110, 255);
+       SETCOL(btheme->tact.ds_subchannel, 124, 137, 150, 255);
 
 
        /* space nla */
@@ -511,12 +511,12 @@ void ui_theme_init_userdef(void)
        /* space image */
        btheme->tima= btheme->tv3d;
        SETCOL(btheme->tima.back,       53, 53, 53, 255);
-       SETCOL(btheme->tima.vertex, 0xff, 0x70, 0xff, 255);
-       SETCOL(btheme->tima.vertex_select, 0xff, 0xff, 0x70, 255);
-       btheme->tima.vertex_size= 2;
-       btheme->tima.facedot_size= 2;
-       SETCOL(btheme->tima.face,   0, 50, 150, 40);
-       SETCOL(btheme->tima.face_select, 200, 100, 200, 80);
+       SETCOL(btheme->tima.vertex, 0, 0, 0, 255);
+       SETCOL(btheme->tima.vertex_select, 255, 133, 0, 255);
+       btheme->tima.vertex_size= 3;
+       btheme->tima.facedot_size= 3;
+       SETCOL(btheme->tima.face,   255, 255, 255, 10);
+       SETCOL(btheme->tima.face_select, 255, 133, 0, 60);
        SETCOL(btheme->tima.editmesh_active, 255, 255, 255, 128);
 
        /* space imageselect */