From c13fa7005aaace047d369e0a0964b52653dcfbb9 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 27 Aug 2024 07:36:43 +0800 Subject: [PATCH] Tweaks to documentation from code review Co-authored-by: Malcolm Smith --- docs/reference/api/resources/statusicons.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/reference/api/resources/statusicons.rst b/docs/reference/api/resources/statusicons.rst index 89f2abb998..b0dd4ff254 100644 --- a/docs/reference/api/resources/statusicons.rst +++ b/docs/reference/api/resources/statusicons.rst @@ -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", @@ -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. @@ -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):