Clase: TouchBarButton
Clase: TouchBarButton
Crea un botón en la barra táctil para aplicaciones macOS nativas
Process: Main
This class is not exported from the 'electron' module. Sólo está disponible como un valor de retorno de otros métodos en la API de Electron.
new TouchBarButton(options)
Al definir accessibilityLabel, asegúrese de que ha considerado las mejores prácticas de macOS.
Propiedades de la instancia
Las siguientes propiedades están disponibles en las instancias de TouchBarButton:
touchBarButton.accessibilityLabel
A string representing the description of the button to be read by a screen reader. Will only be read by screen readers if no label is set.
touchBarButton.label
A string representing the button's current text. Changing this value immediately updates the button in the touch bar.
touchBarButton.backgroundColor
A string hex code representing the button's current background color. Changing this value immediately updates the button in the touch bar.
touchBarButton.icon
Un NativeImage que representa el icono del botón actual. Changing this value immediately updates the button in the touch bar.
touchBarButton.iconPosition
A string - Can be left, right or overlay. Por defecto es overlay.
touchBarButton.enabled
A boolean representing whether the button is in an enabled state.