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_topbar')
-rw-r--r--source/blender/editors/space_topbar/space_topbar.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/editors/space_topbar/space_topbar.c b/source/blender/editors/space_topbar/space_topbar.c
index f2824b3bf70..fc76fd9c638 100644
--- a/source/blender/editors/space_topbar/space_topbar.c
+++ b/source/blender/editors/space_topbar/space_topbar.c
@@ -132,11 +132,6 @@ static void topbar_main_region_init(wmWindowManager *wm, ARegion *region)
WM_event_add_keymap_handler(&region->handlers, keymap);
}
-static void topbar_main_region_draw(const bContext *C, ARegion *region)
-{
- ED_region_header(C, region);
-}
-
static void topbar_operatortypes(void)
{
@@ -156,11 +151,6 @@ static void topbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar)
ED_region_header_init(ar);
}
-static void topbar_header_region_draw(const bContext *C, ARegion *ar)
-{
- ED_region_header(C, ar);
-}
-
static void topbar_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar,
wmNotifier *wmn, const Scene *UNUSED(scene))
{
@@ -263,7 +253,8 @@ void ED_spacetype_topbar(void)
art = MEM_callocN(sizeof(ARegionType), "spacetype topbar main region");
art->regionid = RGN_TYPE_WINDOW;
art->init = topbar_main_region_init;
- art->draw = topbar_main_region_draw;
+ art->layout = ED_region_header_layout;
+ art->draw = ED_region_header_draw;
art->listener = topbar_main_region_listener;
art->prefsizex = UI_UNIT_X * 5; /* Mainly to avoid glitches */
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
@@ -279,7 +270,8 @@ void ED_spacetype_topbar(void)
art->listener = topbar_header_listener;
art->message_subscribe = topbar_header_region_message_subscribe;
art->init = topbar_header_region_init;
- art->draw = topbar_header_region_draw;
+ art->layout = ED_region_header_layout;
+ art->draw = ED_region_header_draw;
BLI_addhead(&st->regiontypes, art);