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/include
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/include')
-rw-r--r--source/blender/editors/include/UI_interface.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 9c9ab2972b3..b997d0ef6a0 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -125,9 +125,11 @@ typedef struct uiLayout uiLayout;
#define UI_BLOCK_POPUP_MEMORY (1 << 12)
#define UI_BLOCK_CLIP_EVENTS (1 << 13) /* stop handling mouse events */
-/* XXX This comment is no more valid! */
+/* XXX This comment is no more valid! Maybe it is now bits 14-17? */
/* block->flag bits 12-15 are identical to but->flag bits */
+#define UI_BLOCK_LIST_ITEM (1 << 19)
+
/* uiPopupBlockHandle->menuretval */
#define UI_RETURN_CANCEL (1 << 0) /* cancel all menus cascading */
#define UI_RETURN_OK (1 << 1) /* choice made */
@@ -251,7 +253,8 @@ typedef enum {
VECTORSCOPE = (50 << 9),
PROGRESSBAR = (51 << 9),
SEARCH_MENU_UNLINK = (52 << 9),
- NODESOCKET = (53 << 9)
+ NODESOCKET = (53 << 9),
+ LISTLABEL = (54 << 9),
} eButType;
#define BUTTYPE (63 << 9)