Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Fix example code.
Minor edits to text.
  • Loading branch information
jimorc committed Dec 5, 2024
1 parent 22b3787 commit d4da566
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,16 @@ A TwoStateToolbarAction displays one of two icons based on the stored state. It
to a regular ToolbarAction except that the icon and state are toggled each time the toolbar
action is activated. The current (new) state is passed to the `onActivated` function.

One potential use of this toolbar action include displaying the MediaPlayIcon when a media
One potential use of this toolbar action is displaying the MediaPlayIcon when a media
file is not being played, and the MediaPauseIcon or MediaStopIcon when a media file is
being played. A second use may be seen in an application where a left or right panel is
di8splayed or not. For example, show the left panel open icon when the left panel is
displayed or not. For example, show the left panel open icon when the left panel is
closed, and the left panel close icon when the panel is open.


```go
action := NewTwoStateToolBar(theme.MediaPlayIcon(),
theme.MediaPauseIcon,
theme.MediaPauseIcon(),
func(on bool) {
// Do something with state. For example, if on is true, start playback.
})
Expand Down

0 comments on commit d4da566

Please sign in to comment.