Skip to content
New issue

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

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

Already on GitHub? # to your account

PR: Provide icon size when creating an IconWidget #238

Merged
merged 4 commits into from
Jun 23, 2023

Conversation

StSav012
Copy link
Contributor

I suggest adding a size keyword-only argument to the constructor of IconWidget to avoid extra setIconSize and update calls.

This way,

icon_widget: qta.IconWidget = qta.IconWidget('mdi.web', color='blue')
icon_widget.setIconSize(QtCore.QSize(32, 32))
icon_widget.update()

turns into

icon_widget: qta.IconWidget = qta.IconWidget('mdi.web', color='blue', size=QtCore.QSize(32, 32))

And I fixed a couple of typos in the docstring of the class.

Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

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

Thanks @StSav012 for your work here! Left a comment regarding some places and things that need an update to follow up with the change done at example.py and the usage there of the new size kwarg.

Other than that this LGTM 👍

Thanks again!

example.py Outdated Show resolved Hide resolved
@dalthviz dalthviz changed the title Provide icon size when creating an IconWidget PR: Provide icon size when creating an IconWidget Jun 21, 2023
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

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

Thanks @StSav012 !

@dalthviz dalthviz merged commit 0bda7bf into spyder-ide:master Jun 23, 2023
@StSav012 StSav012 deleted the provide_icon_size_at_init branch June 26, 2023 06:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants