diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-21 19:51:29 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-21 19:51:29 +0400 |
commit | 904129fd9b11988c5915d940773552d2110f23ab (patch) | |
tree | b66dc8f91980fe72d49c7f130c02441ae2cd5155 /source/blender/editors/interface/interface_layout.c | |
parent | 254aa8f3a0fbffcbcb886cfaa81b630ae3e9bb78 (diff) |
Squashed commit of the following:
commit b8b7180760b7c57f15b9930c29207febcf5fefb3
Author: Bastien Montagne <montagne29@wanadoo.fr>
Date: Thu Nov 21 16:31:16 2013 +0100
Code cleanup: replace "LISTLABEL" button type by an "UI_BUT_LIST_ITEM" button flag.
Summary:
Rationals:
I) I was never that happy to have a full button type just to set custom colors to labels inside listitems!
II) If we use (as planned) TEX buttons instead of labels to allow listitems click-rename, I'd like to be able to use listitems' theme color here as well, much easier witha flag than adding yet another button type!
Note: related to D8
Reviewers: brecht
Differential Revision: http://developer.blender.org/D25
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 4517c098202..e3686b7560c 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1687,7 +1687,7 @@ static uiBut *uiItemL_(uiLayout *layout, const char *name, int icon) /* Mark as a label inside a listbox. */ if (block->flag & UI_BLOCK_LIST_ITEM) { - but->type = LISTLABEL; + but->flag |= UI_BUT_LIST_ITEM; } return but; @@ -2457,7 +2457,7 @@ void ui_layout_list_set_labels_active(uiLayout *layout) if (bitem->item.type != ITEM_BUTTON) { ui_layout_list_set_labels_active((uiLayout *)(&bitem->item)); } - else if (bitem->but->type == LISTLABEL) { + else if (bitem->but->flag & UI_BUT_LIST_ITEM) { uiButSetFlag(bitem->but, UI_SELECT); } } |