From ff78d33bb4eed30e667fcd42f88368b253ac238c Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 27 Sep 2023 15:46:54 +0200 Subject: [PATCH] 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. --- source/blender/editors/space_image/space_image.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_image/space_image.cc b/source/blender/editors/space_image/space_image.cc index 5687d7b02b0..ba22f541e9f 100644 --- a/source/blender/editors/space_image/space_image.cc +++ b/source/blender/editors/space_image/space_image.cc @@ -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(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);