mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
add toolTip property for MenuItem (#19099)
This commit is contained in:
committed by
Cheng Zhao
parent
692df804cf
commit
06d48514c6
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user