diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-24 17:50:15 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-24 17:50:15 +0300 |
commit | a28adf1b356e0431665ebe9998e3baa133c18ef9 (patch) | |
tree | 4c77f58ddb3579a262a66d7a3a0ebafc97627761 /source/blender | |
parent | febf8cb01d2e4323f7788a75bb62b0ef4475883b (diff) |
Some more minor cleanup in new icon preview code.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index adf0fdfa609..1920250f7cc 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1663,13 +1663,9 @@ static uiBlock *ui_icon_view_menu_cb(bContext *C, ARegion *ar, void *arg_litem) for (a = 0; item[a].identifier; a++) { int x, y; - /* XXX hardcoded size to 5 x unit */ - int w = UI_UNIT_X * 5; - int h = UI_UNIT_Y * 5; - - if (args.show_labels) { - h += (int)(1.25f * UI_UNIT_Y); - } + /* XXX hardcoded size to 5 units */ + const int w = UI_UNIT_X * 5; + const int h = args.show_labels ? (int)(6.25f * UI_UNIT_Y) : UI_UNIT_Y * 5; x = (a % 8) * w; y = (a / 8) * h; |