2.5: various one-liner fixes

* 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).
This commit is contained in:
Brecht Van Lommel 2009-07-28 18:59:36 +00:00
parent 801d44a09e
commit 8cf4ef091c
7 changed files with 17 additions and 6 deletions

@ -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

@ -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);
}

@ -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;

@ -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);

@ -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);

@ -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);

@ -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;