From c126e27cdc8b28365a9d5f9fafc4d521d1eb83df Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 18 Nov 2020 15:16:17 -0500 Subject: Cleanup: Move function to proper section --- source/blender/editors/interface/interface_panel.c | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'source/blender/editors/interface/interface_panel.c') diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 26fea3ca1a5..6d376a0b73d 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -138,29 +138,6 @@ static bool panel_type_context_poll(ARegion *region, /** \name Local Functions * \{ */ -static void panel_title_color_get(const Panel *panel, - const bool show_background, - const bool region_search_filter_active, - uchar r_color[4]) -{ - if (!show_background) { - /* Use menu colors for floating panels. */ - bTheme *btheme = UI_GetTheme(); - const uiWidgetColors *wcol = &btheme->tui.wcol_menu_back; - copy_v4_v4_uchar(r_color, (const uchar *)wcol->text); - return; - } - - const bool search_match = UI_panel_matches_search_filter(panel); - - UI_GetThemeColor4ubv(TH_TITLE, r_color); - if (region_search_filter_active && !search_match) { - r_color[0] *= 0.5; - r_color[1] *= 0.5; - r_color[2] *= 0.5; - } -} - static bool panel_active_animation_changed(ListBase *lb, Panel **r_panel_animation, bool *r_no_animation) @@ -1062,6 +1039,29 @@ void UI_panel_label_offset(const uiBlock *block, int *r_x, int *r_y) } } +static void panel_title_color_get(const Panel *panel, + const bool show_background, + const bool region_search_filter_active, + uchar r_color[4]) +{ + if (!show_background) { + /* Use menu colors for floating panels. */ + bTheme *btheme = UI_GetTheme(); + const uiWidgetColors *wcol = &btheme->tui.wcol_menu_back; + copy_v4_v4_uchar(r_color, (const uchar *)wcol->text); + return; + } + + const bool search_match = UI_panel_matches_search_filter(panel); + + UI_GetThemeColor4ubv(TH_TITLE, r_color); + if (region_search_filter_active && !search_match) { + r_color[0] *= 0.5; + r_color[1] *= 0.5; + r_color[2] *= 0.5; + } +} + static void panel_draw_aligned_widgets(const uiStyle *style, const Panel *panel, const rcti *header_rect, -- cgit v1.2.3