Skip to content

Conversation

@kernc
Copy link
Member

@kernc kernc commented Jul 10, 2025

Fixes #26

  • Adds an 'X' button to the top-right corner of the main window for closing the application.
  • Adds a unit test verifying the close button triggers application quit.
  • Updates Qt abstraction layer to ensure QPushButton is available.
  • Refines test setup with necessary mocks for QApplication.instance.

google-labs-jules bot and others added 4 commits July 10, 2025 22:36
- Adds an 'X' button to the top-right corner of the main window for closing the application.
- Adds a unit test verifying the close button triggers application quit.
- Updates Qt abstraction layer to ensure QPushButton is available.
- Refines test setup with necessary mocks for QApplication.instance.
@kernc kernc force-pushed the feature/add-close-button branch from e1f8e19 to 72fe2fa Compare July 11, 2025 20:42
efck/gui.py Outdated
parent=self,
)
close_button.clicked.connect(QApplication.instance().quit)
close_button.setFixedSize(20, 20) # Small, square button
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
close_button.setFixedSize(20, 20) # Small, square button
close_button.setFixedSize(20, 20)

efck/gui.py Outdated
)
close_button.clicked.connect(QApplication.instance().quit)
close_button.setFixedSize(20, 20) # Small, square button
close_button.setStyleSheet("QPushButton { padding: 1px; margin: 4px; }") # Minimal padding and some margin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
close_button.setStyleSheet("QPushButton { padding: 1px; margin: 4px; }") # Minimal padding and some margin
close_button.setStyleSheet("QPushButton { padding: 1px; margin: 4px; }")

@kernc kernc merged commit be66ae4 into master Jul 11, 2025
3 checks passed
kernc added a commit that referenced this pull request Jul 12, 2025
* feat: Add close button and unit test for efck#26

- Adds an 'X' button to the top-right corner of the main window for closing the application.
- Adds a unit test verifying the close button triggers application quit.
- Updates Qt abstraction layer to ensure QPushButton is available.
- Refines test setup with necessary mocks for QApplication.instance.

* Revert complex test

* Fixup

* Update efck/gui.py

* Update efck/gui.py

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Close the app window with an X button at the top right

2 participants