def on_mouse_release(self, event):
        """Act according to mouse release position.

        Parameters
        ==========
        event (pygame.event.Event of pygame.MOUSEBUTTONUP
        type or similar object)
            it is required in order to comply with the
            mouse action protocol used; we retrieve the
            mouse position from its "pos" attribute;

            check pygame.event module documentation on
            pygame website for more info about this event
            object.
        """
        ### retrieve x coordinate of mouse position
        mouse_x, _ = event.pos

        ### if click was more to the left, where the icon
        ### is, we call the method responsible for
        ### calling the text editor to edit the value
        if mouse_x < (self.rect.x + 17):
            self.edit_value()

        ### otherwise the user clicked on the portion of
        ### the button which hints the contents of the
        ### widget, so we display the widget value
        ### in the text viewer

        else:

            view_text(
                text=pformat(self.value, width=84),
                syntax_highlighting="python",
                show_line_number=self.show_line_number,
            )
Act according to mouse release position.

        Parameters
        ==========
        event (pygame.event.Event of pygame.MOUSEBUTTONUP
        type or similar object)
            it is required in order to comply with the
            mouse action protocol used; we retrieve the
            mouse position from its "pos" attribute;

            check pygame.event module documentation on
            pygame website for more info about this event
            object.
        
nodezator/widget/literaldisplay.py