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:
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r--source/blender/editors/space_image/space_image.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index ded19b10300..1e1d1e570b3 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -134,6 +134,13 @@ static SpaceLink *image_new(const ScrArea *UNUSED(area), const Scene *UNUSED(sce
scopes_new(&simage->scopes);
simage->sample_line_hist.height = 100;
+ /* tool header */
+ ar = MEM_callocN(sizeof(ARegion), "tool header for image");
+
+ BLI_addtail(&simage->regionbase, ar);
+ ar->regiontype = RGN_TYPE_TOOL_HEADER;
+ ar->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP;
+
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for image");
@@ -1033,6 +1040,17 @@ void ED_spacetype_image(void)
art->draw = image_tools_region_draw;
BLI_addhead(&st->regiontypes, art);
+ /* regions: tool header */
+ art = MEM_callocN(sizeof(ARegionType), "spacetype image tool header region");
+ art->regionid = RGN_TYPE_TOOL_HEADER;
+ art->prefsizey = HEADERY;
+ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
+ art->listener = image_header_region_listener;
+ art->init = image_header_region_init;
+ art->draw = image_header_region_draw;
+ art->message_subscribe = ED_area_do_mgs_subscribe_for_tool_header;
+ BLI_addhead(&st->regiontypes, art);
+
/* regions: header */
art = MEM_callocN(sizeof(ARegionType), "spacetype image region");
art->regionid = RGN_TYPE_HEADER;