in src/main/java/com/intellij/util/ui/MenuItemLayoutHelper.java [356:368]
protected int calcMaxValue(Object propertyName, int value) {
// Get maximal value from parent client property
int maxValue = getParentIntProperty(propertyName);
// Store new maximal width in parent client property
if (value > maxValue) {
if (miParent != null) {
miParent.putClientProperty(propertyName, value);
}
return value;
} else {
return maxValue;
}
}