UI: Draw Image editor tool header transparent with button background

Same as 55eaa755e3, but for the Image Editor, since this should be done
consistently for all editors using tool headers with region background.
This commit is contained in:
Julian Eisel
2023-09-27 15:46:54 +02:00
parent 9e495c5b06
commit ff78d33bb4

View File

@@ -941,6 +941,18 @@ static void image_tools_region_listener(const wmRegionListenerParams *params)
}
}
/************************* Tool header region **************************/
static void image_tools_header_region_draw(const bContext *C, ARegion *region)
{
ScrArea *area = CTX_wm_area(C);
SpaceImage *sima = static_cast<SpaceImage *>(area->spacedata.first);
image_user_refresh_scene(C, sima);
ED_region_header_with_button_sections(C, region, uiButtonSectionsAlign::Top);
}
/************************* header region **************************/
/* add handlers, stuff you only do once or on area/region changes */
@@ -1153,7 +1165,7 @@ void ED_spacetype_image()
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->draw = image_tools_header_region_draw;
art->message_subscribe = ED_area_do_mgs_subscribe_for_tool_header;
BLI_addhead(&st->regiontypes, art);