Skip to content

Extract keypad panels into separate classes#6

Merged
hethon merged 1 commit into
hethon:masterfrom
CarsenGafford2:master
Mar 31, 2026
Merged

Extract keypad panels into separate classes#6
hethon merged 1 commit into
hethon:masterfrom
CarsenGafford2:master

Conversation

@CarsenGafford2

Copy link
Copy Markdown
Contributor

What this PR does

Move scientific and basic keypad UI construction out of CalculatorView into new ScientificKeypadPanel and BasicKeypadPanel components. The panels encapsulate layout and button creation (append/wrap lists and control buttons) and expose getters for buttons; CalculatorView now instantiates these panels, aggregates their append/wrap button lists, and obtains references to AllClear/Del/Equals/Ans buttons from BasicKeypadPanel. This refactor reduces CalculatorView size and centralizes keypad layout logic with no functional behavior changes.

Related Issue

Closes #5

Move scientific and basic keypad UI construction out of CalculatorView into new ScientificKeypadPanel and BasicKeypadPanel components. The panels encapsulate layout and button creation (append/wrap lists and control buttons) and expose getters for buttons; CalculatorView now instantiates these panels, aggregates their append/wrap button lists, and obtains references to AllClear/Del/Equals/Ans buttons from BasicKeypadPanel. This refactor reduces CalculatorView size and centralizes keypad layout logic with no functional behavior changes.
@hethon

hethon commented Mar 31, 2026

Copy link
Copy Markdown
Owner

Everything looks perfect. Thank you for the PR!

@hethon hethon merged commit 92c1ae8 into hethon:master Mar 31, 2026
1 check passed
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.

Decompose CalculatorView into smaller UI components

2 participants