screen_donation_request

Path: /screens/screen_donation_request.py

Overview

This component displays a full-screen overlay prompting users to consider donating to the Talon project, featuring a title, explanatory text, an image, and a confirmation button.

Purpose & Use Cases

Prompt users for donations after they have experienced Talon to support ongoing development and maintenance.

Provide a non-intrusive way to solicit contributions within the application workflow.

Dependencies

PyQt5 for the application window, event handling, and widgets.

Raven Development Team's ui_components package (UIBaseFull, UITitleText, UIHeaderText, UIImage, UIButton).

Configuration & Parameters

Parameter Type Description Default
None - No configurable parameters for this script. -

Usage Example

python screens/screen_donation_request.py

Behavior & Implementation

On execution, the script initializes a QApplication (or reuses an existing instance), creates a UIBaseFull overlay, and adds a title, header text, and a donation image. A ResizeHandler listens for resize events on the overlay to re-center the image and button(s) dynamically. A single "Okay, I Will Consider It" button is created; its click handler quits the application.

Error Handling

No explicit error handling is implemented; any exceptions will propagate to PyQt's default exception handlers and terminate the application.

Security Considerations

The component does not handle untrusted input and relies on static resources; ensure donation_request.png is a trusted asset to avoid loading malicious content.

Logging

No logging is performed by this component.

Testing & Validation

Manually run the script and verify the overlay appears with correctly positioned elements. Test resizing the window to confirm dynamic repositioning of the image and button.

Author

Author: Raven Development Team