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:
authorJulian Eisel <eiseljulian@gmail.com>2017-03-17 19:08:20 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-03-17 19:10:05 +0300
commit2977a8cd2176997ab38dc4ba22db9b4029365aad (patch)
tree08277a4fd832e0b91793a9caa2af1cdedb80a230 /source/blender/editors/interface/interface_align.c
parenta96008f3aae2b047ce777418e45eeae09e0ea4e6 (diff)
Add tabs as standard button types
NOTE: This is really a backend-only implementation, nothing is changed in the UI Adds a tab button-type and the basic drawing and handling code for it. More work needs to be done on it, but idea is to get in ready for usage in the topbar. Differential Revision: https://developer.blender.org/D1371
Diffstat (limited to 'source/blender/editors/interface/interface_align.c')
-rw-r--r--source/blender/editors/interface/interface_align.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_align.c b/source/blender/editors/interface/interface_align.c
index 500744c366d..9aeb685a907 100644
--- a/source/blender/editors/interface/interface_align.c
+++ b/source/blender/editors/interface/interface_align.c
@@ -110,9 +110,9 @@ enum {
bool ui_but_can_align(const uiBut *but)
{
- return (
- !ELEM(but->type, UI_BTYPE_LABEL, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE) &&
- (BLI_rctf_size_x(&but->rect) > 0.0f) && (BLI_rctf_size_y(&but->rect) > 0.0f));
+ const bool btype_can_align = !ELEM(but->type, UI_BTYPE_LABEL, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N,
+ UI_BTYPE_TAB, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE);
+ return (btype_can_align && (BLI_rctf_size_x(&but->rect) > 0.0f) && (BLI_rctf_size_y(&but->rect) > 0.0f));
}
/**