[Bf-blender-cvs] [c126e27cdc8] master: Cleanup: Move function to proper section
Hans Goudey
noreply at git.blender.org
Wed Nov 18 21:16:22 CET 2020
Commit: c126e27cdc8b28365a9d5f9fafc4d521d1eb83df
Author: Hans Goudey
Date: Wed Nov 18 15:16:17 2020 -0500
Branches: master
https://developer.blender.org/rBc126e27cdc8b28365a9d5f9fafc4d521d1eb83df
Cleanup: Move function to proper section
===================================================================
M 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,
More information about the Bf-blender-cvs
mailing list