docs: fix TouchBar related documentation (#19444)

This commit is contained in:
Milan Burda 2019-08-01 16:59:26 +02:00 committed by John Kleinschmidt
parent b80429ab7f
commit 115b57649e
5 changed files with 22 additions and 22 deletions

View file

@ -11,7 +11,7 @@ Process: [Main](../tutorial/application-architecture.md#main-and-renderer-proces
* `backgroundColor` String (optional) - Button background color in hex format, * `backgroundColor` String (optional) - Button background color in hex format,
i.e `#ABCDEF`. i.e `#ABCDEF`.
* `icon` [NativeImage](native-image.md) | String (optional) - Button icon. * `icon` [NativeImage](native-image.md) | String (optional) - Button icon.
* `iconPosition` String (optional) - Can be `left`, `right` or `overlay`. * `iconPosition` String (optional) - Can be `left`, `right` or `overlay`. Defaults to `overlay`.
* `click` Function (optional) - Function to call when the button is clicked. * `click` Function (optional) - Function to call when the button is clicked.
### Instance Properties ### Instance Properties

View file

@ -9,7 +9,7 @@ Process: [Main](../tutorial/application-architecture.md#main-and-renderer-proces
* `options` Object * `options` Object
* `label` String (optional) - Popover button text. * `label` String (optional) - Popover button text.
* `icon` [NativeImage](native-image.md) (optional) - Popover button icon. * `icon` [NativeImage](native-image.md) (optional) - Popover button icon.
* `items` [TouchBar](touch-bar.md) (optional) - Items to display in the popover. * `items` [TouchBar](touch-bar.md) - Items to display in the popover.
* `showCloseButton` Boolean (optional) - `true` to display a close button * `showCloseButton` Boolean (optional) - `true` to display a close button
on the left of the popover, `false` to not show it. Default is `true`. on the left of the popover, `false` to not show it. Default is `true`.

View file

@ -12,10 +12,10 @@ Process: [Main](../tutorial/application-architecture.md#main-and-renderer-proces
* `selectedIndex` Integer - The index of the item the user selected. * `selectedIndex` Integer - The index of the item the user selected.
* `highlight` Function (optional) - Called when the user taps any item. * `highlight` Function (optional) - Called when the user taps any item.
* `highlightedIndex` Integer - The index of the item the user touched. * `highlightedIndex` Integer - The index of the item the user touched.
* `selectedStyle` String (optional) - Selected item style. Defaults to `null`. * `selectedStyle` String (optional) - Selected item style. Can be `background`, `outline` or `none`. Defaults to `none`.
* `overlayStyle` String (optional) - Selected overlay item style. Defaults to `null`. * `overlayStyle` String (optional) - Selected overlay item style. Can be `background`, `outline` or `none`. Defaults to `none`.
* `showArrowButtons` Boolean (optional) - Defaults to `false`. * `showArrowButtons` Boolean (optional) - Defaults to `false`.
* `mode` String (optional) - Defaults to `free`. * `mode` String (optional) - Can be `fixed` or `free`. The default is `free`.
* `continuous` Boolean (optional) - Defaults to `true`. * `continuous` Boolean (optional) - Defaults to `true`.
### Instance Properties ### Instance Properties
@ -34,7 +34,7 @@ updates the control in the touch bar. Possible values:
* `background` - Maps to `[NSScrubberSelectionStyle roundedBackgroundStyle]`. * `background` - Maps to `[NSScrubberSelectionStyle roundedBackgroundStyle]`.
* `outline` - Maps to `[NSScrubberSelectionStyle outlineOverlayStyle]`. * `outline` - Maps to `[NSScrubberSelectionStyle outlineOverlayStyle]`.
* `null` - Actually null, not a string, removes all styles. * `none` - Removes all styles.
#### `touchBarScrubber.overlayStyle` #### `touchBarScrubber.overlayStyle`
@ -44,7 +44,7 @@ touch bar. Possible values:
* `background` - Maps to `[NSScrubberSelectionStyle roundedBackgroundStyle]`. * `background` - Maps to `[NSScrubberSelectionStyle roundedBackgroundStyle]`.
* `outline` - Maps to `[NSScrubberSelectionStyle outlineOverlayStyle]`. * `outline` - Maps to `[NSScrubberSelectionStyle outlineOverlayStyle]`.
* `null` - Actually null, not a string, removes all styles. * `none` - Removes all styles.
#### `touchBarScrubber.showArrowButtons` #### `touchBarScrubber.showArrowButtons`

View file

@ -10,23 +10,23 @@ Process: [Main](../tutorial/application-architecture.md#main-and-renderer-proces
* `segmentStyle` String (optional) - Style of the segments: * `segmentStyle` String (optional) - Style of the segments:
* `automatic` - Default. The appearance of the segmented control is * `automatic` - Default. The appearance of the segmented control is
automatically determined based on the type of window in which the control automatically determined based on the type of window in which the control
is displayed and the position within the window. is displayed and the position within the window. Maps to `NSSegmentStyleAutomatic`.
* `rounded` - The control is displayed using the rounded style. * `rounded` - The control is displayed using the rounded style. Maps to `NSSegmentStyleRounded`.
* `textured-rounded` - The control is displayed using the textured rounded * `textured-rounded` - The control is displayed using the textured rounded
style. style. Maps to `NSSegmentStyleTexturedRounded`.
* `round-rect` - The control is displayed using the round rect style. * `round-rect` - The control is displayed using the round rect style. Maps to `NSSegmentStyleRoundRect`.
* `textured-square` - The control is displayed using the textured square * `textured-square` - The control is displayed using the textured square
style. style. Maps to `NSSegmentStyleTexturedSquare`.
* `capsule` - The control is displayed using the capsule style. * `capsule` - The control is displayed using the capsule style. Maps to `NSSegmentStyleCapsule`.
* `small-square` - The control is displayed using the small square style. * `small-square` - The control is displayed using the small square style. Maps to `NSSegmentStyleSmallSquare`.
* `separated` - The segments in the control are displayed very close to each * `separated` - The segments in the control are displayed very close to each
other but not touching. other but not touching. Maps to `NSSegmentStyleSeparated`.
* `mode` String (optional) - The selection mode of the control: * `mode` String (optional) - The selection mode of the control:
* `single` - Default. One item selected at a time, selecting one deselects the previously selected item. * `single` - Default. One item selected at a time, selecting one deselects the previously selected item. Maps to `NSSegmentSwitchTrackingSelectOne`.
* `multiple` - Multiple items can be selected at a time. * `multiple` - Multiple items can be selected at a time. Maps to `NSSegmentSwitchTrackingSelectAny`.
* `buttons` - Make the segments act as buttons, each segment can be pressed and released but never marked as active. * `buttons` - Make the segments act as buttons, each segment can be pressed and released but never marked as active. Maps to `NSSegmentSwitchTrackingMomentary`.
* `segments` [SegmentedControlSegment[]](structures/segmented-control-segment.md) - An array of segments to place in this control. * `segments` [SegmentedControlSegment[]](structures/segmented-control-segment.md) - An array of segments to place in this control.
* `selectedIndex` Integer (optional) - The index of the currently selected segment, will update automatically with user interaction. When the mode is multiple it will be the last selected item. * `selectedIndex` Integer (optional) - The index of the currently selected segment, will update automatically with user interaction. When the mode is `multiple` it will be the last selected item.
* `change` Function (optional) - Called when the user selects a new segment. * `change` Function (optional) - Called when the user selects a new segment.
* `selectedIndex` Integer - The index of the segment the user selected. * `selectedIndex` Integer - The index of the segment the user selected.
* `isSelected` Boolean - Whether as a result of user selection the segment is selected or not. * `isSelected` Boolean - Whether as a result of user selection the segment is selected or not.

View file

@ -8,6 +8,6 @@ Process: [Main](../tutorial/application-architecture.md#main-and-renderer-proces
* `options` Object * `options` Object
* `size` String (optional) - Size of spacer, possible values are: * `size` String (optional) - Size of spacer, possible values are:
* `small` - Small space between items. * `small` - Small space between items. Maps to `NSTouchBarItemIdentifierFixedSpaceSmall`. This is the default.
* `large` - Large space between items. * `large` - Large space between items. Maps to `NSTouchBarItemIdentifierFixedSpaceLarge`.
* `flexible` - Take up all available space. * `flexible` - Take up all available space. Maps to `NSTouchBarItemIdentifierFlexibleSpace`.