diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-19 21:13:33 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-19 21:13:33 +0400 |
commit | 40ae17d2f6e2d5dbbe89321491572035c304872c (patch) | |
tree | 7f39fe42977a45878352e34d7bfdc1820ed980ff /source/blender/editors/space_image/space_image.c | |
parent | 861398542f8ba71dd4783886adda21544d939763 (diff) |
UI
* Fix buttons jumping around when resizing and zoom. Part of this was
adding a tiny a 0.001f offset in UI_view2d_view_ortho, otherwise the
rounding is unpredictable (used to be 0.375f, but that was disabled).
* Fix various issues with zooming, panning panels. V2D_LOCKOFS_X/Y is
now taken into account in more places in the view2d code, to avoid
zooming into the center or panning out of the view.
* Remove "Free" align mode in buttons window (it's not really useful).
* View3D/Graph/Image editors now use the same PanelType system as the
buttons window, means some deprecated panel code could be removed.
* Some small visual tweaks for panels.
* View 2D Reset operator (Home key), to reset zoom and panning for panels.
* Added argument to set number buttons as sliders (slider=True for itemR).
* Ignore labels for button alignment (doesn't look right).
* Fix some use of context.main in py scripts, should get data from active
object instead.
* Fix autotexspace -> auto_texspace in py script.
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 5f743afd65d..c82018a3aac 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -483,32 +483,16 @@ static void image_main_area_listener(ARegion *ar, wmNotifier *wmn) static void image_buttons_area_init(wmWindowManager *wm, ARegion *ar) { ListBase *keymap; + + ED_region_panels_init(wm, ar); - keymap= WM_keymap_listbase(wm, "View2D Buttons List", 0, 0); - WM_event_add_keymap_handler(&ar->handlers, keymap); keymap= WM_keymap_listbase(wm, "Image Generic", SPACE_IMAGE, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST_UI, ar->winx, ar->winy); } static void image_buttons_area_draw(const bContext *C, ARegion *ar) { - float col[3]; - - /* clear */ - UI_GetThemeColor3fv(TH_PANEL, col); - - 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); - - image_buttons_area_defbuts(C, ar); - - /* restore view matrix? */ - UI_view2d_view_restore(C); + ED_region_panels(C, ar, 1, NULL); } static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn) @@ -590,6 +574,8 @@ void ED_spacetype_image(void) art->draw= image_buttons_area_draw; BLI_addhead(&st->regiontypes, art); + image_buttons_register(art); + /* regions: header */ art= MEM_callocN(sizeof(ARegionType), "spacetype image region"); art->regionid = RGN_TYPE_HEADER; |