Skip to content

Commit

Permalink
Tweaks to documentation from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Malcolm Smith <[email protected]>
  • Loading branch information
freakboy3742 and mhsmith authored Aug 26, 2024
1 parent 285484f commit c13fa70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/reference/api/resources/statusicons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ and add it to your app's :attr:`~toga.App.status_icons` set:
# Define a status icon that uses default values for icon and tooltip,
# and doesn't respond to mouse clicks.
status_icon_1 = SimpleStatusIcon()
status_icon_1 = toga.SimpleStatusIcon()
# Define a second status icon that provides explicit values for the id, icon and
# tooltip, and responds to mouse clicks.
def my_handler(widget, **kwargs):
print("Second status icon pressed!")
status_icon_2 = SimpleStatusIcon(
status_icon_2 = toga.SimpleStatusIcon(
id="second",
text="Hello!",
icon="icons/red",
Expand All @@ -104,7 +104,7 @@ it can be removed from the app:
Menu status icons
~~~~~~~~~~~~~~~~~

A menu-based status icon is define by adding a :class:`toga.MenuStatusIcon` instance. A
A menu-based status icon is defined by adding a :class:`toga.MenuStatusIcon` instance. A
:class:`toga.MenuStatusIcon` behaves almost the same as :class:`~toga.SimpleStatusIcon`,
except that it *cannot* have an ``on_click`` handler - but it *can* be used to register
Commands that will be displayed in a menu when the icon is clicked.
Expand All @@ -119,7 +119,7 @@ a sub-menu that itself has a single menu item:
.. code-block:: python
# Create a MenuStatusIcon
status_icon = MenuStatusIcon(icon="icons/blue")
status_icon = toga.MenuStatusIcon(icon="icons/blue")
# Create some commands that are associated with the menu status icon's group.
def callback(sender, **kwargs):
Expand Down

0 comments on commit c13fa70

Please sign in to comment.