Cleanup: Move function to proper section
This commit is contained in:
parent
0d93bd8d63
commit
c126e27cdc
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue