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:
authorCampbell Barton <ideasman42@gmail.com>2014-03-12 12:24:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-12 15:56:10 +0400
commite5e0888a8f024bdc2d3196055762050195bec7a9 (patch)
tree24d5ca5a43fa3e5de2b669c6cc183f72c4d40cd5 /source/blender/editors/screen
parenta7faad9aa11c5a8cab4497b7eb8345ce05a09814 (diff)
UI: allow passing "" for icon only enum buttons and still get an icon
Enum icon-only buttons were getting their strings set, then truncated with blenders string shortening methods, then not drawn because there was no room (since buttons are icon width). Modify UI code so icon-only buttons don't get names and passing "" to a button won't have its text set later on.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/area.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 111e2f97f62..70378046b02 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1535,7 +1535,7 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco)
RNA_pointer_create(&(scr->id), &RNA_Area, sa, &areaptr);
- uiDefButR(block, MENU, 0, NULL, xco, yco, 1.5 * U.widget_unit, U.widget_unit,
+ uiDefButR(block, MENU, 0, "", xco, yco, 1.5 * U.widget_unit, U.widget_unit,
&areaptr, "type", 0, 0.0f, 0.0f, 0.0f, 0.0f, "");
return xco + 1.7 * U.widget_unit;