Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add addKey method to QIconifyIcon #218

Merged
merged 4 commits into from
Nov 8, 2023

Conversation

tlambert03
Copy link
Member

This PR adds an addKey method, similar to QIcon.addFile, to QIconifyIcon. It can be used to add icons/colors for various states/modes:

    def addKey(
        self,
        *key: str,
        color: str | None = None,
        flip: Flip | None = None,
        rotate: Rotation | None = None,
        dir: str | None = None,
        size: QSize | None = None,
        mode: QIcon.Mode = QIcon.Mode.Normal,
        state: QIcon.State = QIcon.State.Off,
    ) -> None:

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (61e7409) 87.42% compared to head (9aa2a6a) 87.45%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #218      +/-   ##
==========================================
+ Coverage   87.42%   87.45%   +0.02%     
==========================================
  Files          46       46              
  Lines        3356     3355       -1     
==========================================
  Hits         2934     2934              
+ Misses        422      421       -1     
Files Coverage Δ
src/superqt/iconify/__init__.py 100.00% <100.00%> (+7.14%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tlambert03 tlambert03 changed the title feat: add QIconifyIcon method to QIconifyIcon feat: add addKey method to QIconifyIcon Nov 8, 2023
@tlambert03 tlambert03 merged commit b927159 into pyapp-kit:main Nov 8, 2023
47 checks passed
@tlambert03 tlambert03 deleted the addKey branch November 8, 2023 17:52
@tlambert03 tlambert03 added the enhancement New feature or request label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

1 participant