add toolTip property for MenuItem (#19099)

This commit is contained in:
Micha Hanselmann 2019-07-11 01:56:22 -07:00 committed by Cheng Zhao
parent 692df804cf
commit 06d48514c6
8 changed files with 41 additions and 3 deletions

View file

@ -33,6 +33,7 @@ const MenuItem = function (options) {
this.overrideProperty('label', roles.getDefaultLabel(this.role))
this.overrideProperty('sublabel', '')
this.overrideProperty('toolTip', '')
this.overrideProperty('enabled', true)
this.overrideProperty('visible', true)
this.overrideProperty('checked', false)

View file

@ -121,6 +121,7 @@ Menu.prototype.insert = function (pos, item) {
// set item properties
if (item.sublabel) this.setSublabel(pos, item.sublabel)
if (item.toolTip) this.setToolTip(pos, item.toolTip)
if (item.icon) this.setIcon(pos, item.icon)
if (item.role) this.setRole(pos, item.role)