Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-12-15 16:23:55 +0300
committerTon Roosendaal <ton@blender.org>2008-12-15 16:23:55 +0300
commita1e0868018150f89a9b0ca2d92122ef75ec5c119 (patch)
tree64863a3b5546fe858d7a85517dc2c689f4e50b1a /source/blender/editors/space_outliner
parentd48f4b6012ccfc1a1da6a1a002d7c86cacbd98aa (diff)
2.5
- depricated area "headbutofs" and "headbutlen", which is now fully replaced with view2d handling. - needed to add header default V2D_ALIGN_NO_NEG_Y, V2D_LOCKOFS_Y seems to not do anything atm :) - new: running blender in debug (blender -d) will print the current handler and operator in use (not mousemove)
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_header.c2
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c11
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_header.c b/source/blender/editors/space_outliner/outliner_header.c
index 16b64e0a328..5a56e8ef0f1 100644
--- a/source/blender/editors/space_outliner/outliner_header.c
+++ b/source/blender/editors/space_outliner/outliner_header.c
@@ -133,7 +133,7 @@ void outliner_header_buttons(const bContext *C, ARegion *ar)
}
/* always as last */
- sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon
+ UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
uiEndBlock(C, block);
uiDrawBlock(block);
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 84beb52e953..c98ec6de4e7 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -442,6 +442,11 @@ static void outliner_main_area_free(ARegion *ar)
/* ************************ header outliner area region *********************** */
+/* add handlers, stuff you only do once or on area/region changes */
+static void outliner_header_area_init(wmWindowManager *wm, ARegion *ar)
+{
+ UI_view2d_size_update(&ar->v2d, ar->winx, ar->winy);
+}
static void outliner_header_area_draw(const bContext *C, ARegion *ar)
{
@@ -455,6 +460,9 @@ static void outliner_header_area_draw(const bContext *C, ARegion *ar)
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
+ /* set view2d view matrix for scrolling (without scrollers) */
+ UI_view2d_view_ortho(C, &ar->v2d);
+
outliner_header_buttons(C, ar);
}
@@ -586,8 +594,9 @@ void ED_spacetype_outliner(void)
art= MEM_callocN(sizeof(ARegionType), "spacetype time region");
art->regionid = RGN_TYPE_HEADER;
art->minsizey= HEADERY;
- art->keymapflag= ED_KEYMAP_UI;
+ art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
+ art->init= outliner_header_area_init;
art->draw= outliner_header_area_draw;
art->free= outliner_header_area_free;
BLI_addhead(&st->regiontypes, art);