Skip to content

Conversation

@self-init
Copy link
Owner

closes #3

This pull request refactors GUI code to inherit from a new AbstractBaseWidget class that shares common functionality, including creation and re-creation upon resizing.

It also adds a new ButtonLayout class that can be used to define button layouts for the calculator, as well as two default layouts: LAYOUT_STANDARD_WIDE and LAYOUT_STANDARD_TALL, which are used depending on the aspect ratio of the window.

Adds support for multiple layouts via the ButtonLayout dataclass.
Creates a new AbstractBaseWidget class that is inherited by the button and display of the calculator. It shares common functionality including rebuilding the gui on resize.
Added a wide layout for the calculator that is enabled when the calculator is wider than it is tall.
@self-init self-init linked an issue Aug 16, 2025 that may be closed by this pull request
@self-init self-init merged commit d32f35a into main Aug 16, 2025
1 check passed
@self-init self-init deleted the multiple-button-layouts branch August 16, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CalculatorButtons multiple layouts

2 participants