2.5: various one-liner fixes
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 28 Jul 2009 18:59:36 +0000 (18:59 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 28 Jul 2009 18:59:36 +0000 (18:59 +0000)
* Image window only show game properties in game mode.
* Fix image window render info drawing wrong with alpha enabled.
* Win32 editmode cursor now uses a different one than the system
  cursor, that one is barely visible, especially in the new theme
  colors.
* Center text in operator header print.
* Fix sequencer unlock shortcut key.
* Fix uv layer / vertex color active render button now graying out.
* Workaround to get default zoom level 1:1 again for new buttons
  (will try to fix properly later, is due to scrollbars).

release/ui/space_image.py
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/view2d.c
source/blender/editors/screen/area.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/windowmanager/intern/wm_cursors.c

index f89508929576a446a6417c90207ae7ac1a83c9c8..eeac19c04e05786565ae7083a67cd6c104b72686 100644 (file)
@@ -275,8 +275,9 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
        __label__ = "Game Properties"
 
        def poll(self, context):
+               rd = context.scene.render_data
                sima = context.space_data
-               return (sima and sima.image)
+               return (sima and sima.image) and (rd.engine == 'BLENDER_GAME')
 
        def draw(self, context):
                sima = context.space_data
index 8b01c341565382b2baf91ad9f73237ab4ced6d00..4383ba8858bfbbeb0f3c213400437d08abe973bc 100644 (file)
@@ -1558,7 +1558,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
                                        /* XXX hardcoded */
                                        if(itemptr.type == &RNA_MeshTextureFaceLayer || itemptr.type == &RNA_MeshColorLayer) {
                                                uiBlockSetEmboss(block, UI_EMBOSSN);
-                                               uiItemR(subrow, "", ICON_SCENE, &itemptr, "active_render", 0, 0, 0);
+                                               uiDefIconButR(block, TOG, 0, ICON_SCENE, 0, 0, UI_UNIT_X, UI_UNIT_Y, &itemptr, "active_render", 0, 0, 0, 0, 0, NULL);
                                                uiBlockSetEmboss(block, UI_EMBOSS);
                                        }
 
index 0f7532383c9599acb64be1756269f79483b8d674..c76110ac440d661e3e07d4ca5171fed945161d9f 100644 (file)
@@ -273,10 +273,12 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                                v2d->tot.ymin= -winy;
                                
                                v2d->cur.xmin= 0.0f;
-                               v2d->cur.xmax= winx*panelzoom;
+                               /* bad workaround for keeping zoom level with scrollers */
+                               v2d->cur.xmax= (winx - V2D_SCROLL_WIDTH)*panelzoom;
                                
                                v2d->cur.ymax= 0.0f;
-                               v2d->cur.ymin= -winy*panelzoom;
+                               /* bad workaround for keeping zoom level with scrollers */
+                               v2d->cur.ymin= (-winy + V2D_SCROLL_HEIGHT)*panelzoom;
                        }
                                break;
                                
index 62f6e87f073831b91af8648387d7905ca03d1d8c..c74a5ca9c87d7a644c72e3f4f55a972691a16e8f 100644 (file)
@@ -330,7 +330,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
                glClear(GL_COLOR_BUFFER_BIT);
                
                UI_ThemeColor(TH_TEXT);
-               BLF_draw_default(20, 6, 0.0f, ar->headerstr);
+               BLF_draw_default(20, 8, 0.0f, ar->headerstr);
        }
        else if(at->draw) {
                at->draw(C, ar);
index 7050c7f6d7cc9b66a37c9a090e7ea9bb8eeae35b..ff25a2635d242e9d334bd018554835ba378beff4 100644 (file)
@@ -151,6 +151,7 @@ static void draw_render_info(Image *ima, ARegion *ar)
        /* clear header rect */
        UI_GetThemeColor3fv(TH_BACK, colf);
        glEnable(GL_BLEND);
+       glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
        glColor4f(colf[0]+0.1f, colf[1]+0.1f, colf[2]+0.1f, 0.5f);
        glRecti(rect.xmin, rect.ymin, rect.xmax, rect.ymax+1);
        glDisable(GL_BLEND);
index f561fb2ac43672ffcb74532839b20696afcde009..74f22b86b75ce6d38d760bfaa21a4fcd75626152 100644 (file)
@@ -123,7 +123,7 @@ void sequencer_keymap(wmWindowManager *wm)
        RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "unselected", 1);
 
        WM_keymap_add_item(keymap, "SEQUENCER_OT_lock", LKEY, KM_PRESS, KM_SHIFT, 0);
-       WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", HKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0);
+       WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", LKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0);
 
        WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0);
 
index 79830aca12fe21339580de556970f1eb14721d4a..56a8d76d8bfe1126cc21f5df45fc83058d2fd7a0 100644 (file)
@@ -104,6 +104,13 @@ void WM_cursor_set(wmWindow *win, int curs)
                return;
        }
 
+#ifdef _WIN32
+       /* the default win32 cross cursor is barely visible,
+        * only 1 pixel thick, use another one instead */
+       if(curs==CURSOR_EDIT)
+               curs= BC_CROSSCURSOR;
+#endif
+
        GHOST_SetCursorVisibility(win->ghostwin, 1);
        
        win->cursor= curs;