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:
authorHarley Acheson <harley>2019-01-04 17:08:47 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-04 17:20:02 +0300
commit81f29678dcd733ac0a210a2a9d2ac48b06e60daa (patch)
tree5bc9d80ff005d07bf51f25076fc3a2c68a31beeb /source/blender/editors/interface/interface_layout.c
parentce40b0b3f5279e97845f27bde4432c15d3de26bc (diff)
UI: fix display of menu buttons without text and icon, and only a down arrow.
Differential Revision: https://developer.blender.org/D4123
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 0c94705bb1f..e6c3d968a27 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -291,6 +291,9 @@ static int ui_text_icon_width(uiLayout *layout, const char *name, int icon, bool
variable = ui_layout_variable_size(layout);
if (variable) {
+ if (!icon && !name[0]) {
+ return unit_x; /* No icon or name. */
+ }
if (layout->alignment != UI_LAYOUT_ALIGN_EXPAND) {
layout->item.flag |= UI_ITEM_MIN;
}