当前位置: 首页 > 文档资料 > Electron 中文文档 >

ThumbarButton 对象

优质
小牛编辑
118浏览
2023-12-01
  • icon NativeImage - 显示在缩略图工具栏中的图标.
  • click Function
  • tooltip String (可选) - 按钮的提示文本.
  • flags String - 控制按钮特定的状态和行为. 默认为 ['enabled'].

flags 属性是一个数组,包含以下String类型的值:

  • enabled - 该按钮处于活动状态并可供用户使用.
  • disabled - 该按钮被禁用。 它存在,但有一个显示状态表明它不会响应用户操作。
  • dismissonclick - 当按钮被点击时,缩略图窗口立即关闭。
  • nobackground - 不可以画按钮边框,只能使用图片背景。
  • hidden - 该按钮对用户不可见。
  • noninteractive - 该按钮已启用,但处于未激活状态; 没有绘制按钮按下状态。 这个值用于通知功能的按钮实例。

ThumbarButton Object

  • icon NativeImage - The icon showing in thumbnail toolbar.
  • click Function
  • tooltip String (optional) - The text of the button's tooltip.
  • flags String - Control specific states and behaviors of the button. By default, it is ['enabled'].

The flags is an array that can include following Strings:

  • enabled - The button is active and available to the user.
  • disabled - The button is disabled. It is present, but has a visual state indicating it will not respond to user action.
  • dismissonclick - When the button is clicked, the thumbnail window closes immediately.
  • nobackground - Do not draw a button border, use only the image.
  • hidden - The button is not shown to the user.
  • noninteractive - The button is enabled but not interactive; no pressed button state is drawn. This value is intended for instances where the button is used in a notification.