[Bf-blender-cvs] [7821985196] temp-layers-ui-table: Use entire width of collections editor for table

Julian Eisel noreply at git.blender.org
Thu Feb 9 14:03:51 CET 2017


Commit: 7821985196fa60c7a10a7a6a465631a4c337fb7c
Author: Julian Eisel
Date:   Thu Feb 9 14:01:28 2017 +0100
Branches: temp-layers-ui-table
https://developer.blender.org/rB7821985196fa60c7a10a7a6a465631a4c337fb7c

Use entire width of collections editor for table

===================================================================

M	source/blender/editors/space_collections/collections_draw.c

===================================================================

diff --git a/source/blender/editors/space_collections/collections_draw.c b/source/blender/editors/space_collections/collections_draw.c
index f638d01db7..fdf3156298 100644
--- a/source/blender/editors/space_collections/collections_draw.c
+++ b/source/blender/editors/space_collections/collections_draw.c
@@ -42,12 +42,13 @@ void collections_draw_table(const struct bContext *C, SpaceCollections *spc, ARe
 {
 	uiStyle *style = UI_style_get_dpi();
 	uiBlock *block = UI_block_begin(C, ar, __func__, 0);
+	const int table_width = MAX2(BLI_rctf_size_x(&ar->v2d.tot), BLI_rctf_size_x(&ar->v2d.cur));
 	unsigned char col1[3], col2[3];
 
 	UI_GetThemeColorShade3ubv(TH_BACK, 6, col1);
 	UI_GetThemeColor3ubv(TH_BACK, col2);
 
-	UI_table_max_width_set(spc->table, BLI_rctf_size_x(&ar->v2d.tot));
+	UI_table_max_width_set(spc->table, table_width);
 	UI_table_background_colors_set(spc->table, col1, col2);
 
 	UI_table_draw(spc->table, block, style);




More information about the Bf-blender-cvs mailing list