Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-06-26 11:28:55 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-06-26 11:28:55 +0400
commit063be8fdc03e2fed9d2bec4fc80db6b55fec42c1 (patch)
treefb830bcb53fd5a6575c66d9b598038de98dbbd98 /source/blender/editors/interface/interface_intern.h
parentc0c9f5386bac539e3824a5a97bd2243484598594 (diff)
Fix [#35750] list items in properties editor (text colors not following list item theme).
Issue goes back since we stopped using LISTROW button to draw item's name (i.e. since we have custom buttons in list items!). This commit: * Adds a new flag to uiBlock, UI_BLOCK_LIST_ITEM, to mark blocks used for each list item. * Adds a new button type, LISTLABEL, which basically behaves exactly as LABEL, but uses wcol_list_item color set. * When uiItemL is called, it checks whether current block has UI_BLOCK_LIST_ITEM set, and if so, switch produced button to LISTLABEL type. * Adds a new helper func, ui_layout_list_set_labels_active, called after the active list item has been "drawn", to set all LISTLABEL buttons as UI_SELECT. Note custom widget_state_label() was removed, in interface_widgets.c, as it did nothing more than default widget_state(). Thanks to Brecht for the review and advices.
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r--source/blender/editors/interface/interface_intern.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index a6076b8df78..82352cee05e 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -94,7 +94,8 @@ typedef enum {
UI_WTYPE_BOX,
UI_WTYPE_SCROLL,
UI_WTYPE_LISTITEM,
- UI_WTYPE_PROGRESSBAR
+ UI_WTYPE_PROGRESSBAR,
+ UI_WTYPE_LISTLABEL,
} uiWidgetTypeEnum;
/* menu scrolling */
@@ -563,6 +564,7 @@ void ui_layout_add_but(uiLayout *layout, uiBut *but);
int ui_but_can_align(uiBut *but);
void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop);
void ui_but_add_shortcut(uiBut *but, const char *key_str, const bool do_strip);
+void ui_layout_list_set_labels_active(uiLayout *layout);
/* interface_anim.c */
void ui_but_anim_flag(uiBut *but, float cfra);