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 svg thumbnail support (port #442) #540

Merged
merged 4 commits into from
Oct 14, 2024
Merged

feat: add svg thumbnail support (port #442) #540

merged 4 commits into from
Oct 14, 2024

Conversation

CyanVoxel
Copy link
Member

This PR is a port of #442 which previously targeted thumbnails/Alpha-v9.4 to main (aka v9.5x).

This adds thumbnail/preview support for SVG files.

@CyanVoxel CyanVoxel added Type: Enhancement New feature or request Type: UI/UX User interface and/or user experience Priority: Low Doesn't require immediate attention Status: Review Needed A review of this is needed labels Oct 11, 2024
@CyanVoxel CyanVoxel added this to the Alpha v9.5 (Post-SQL) milestone Oct 11, 2024
# Create an svg renderer, then render to the painter
svg: QSvgRenderer = QSvgRenderer(str(filepath))

if svg.isValid():
Copy link
Collaborator

Choose a reason for hiding this comment

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

it would be nice to flip the logic here like:

if not svg.isValid():
    raise UnidentifiedImageError

# same code as originally except not indented

@yedpodtrzitko
Copy link
Collaborator

something something test :) b1bae1f

@CyanVoxel
Copy link
Member Author

The test here may result in a similar issue experienced here: #543 (comment)

Copy link
Collaborator

@yedpodtrzitko yedpodtrzitko left a comment

Choose a reason for hiding this comment

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

dont forget to squash the commits :)

@CyanVoxel CyanVoxel merged commit 9255a86 into main Oct 14, 2024
10 checks passed
@CyanVoxel CyanVoxel mentioned this pull request Oct 14, 2024
@CyanVoxel CyanVoxel removed Priority: Low Doesn't require immediate attention Status: Review Needed A review of this is needed labels Oct 14, 2024
@CyanVoxel CyanVoxel deleted the svg-thumbs branch October 17, 2024 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request Type: UI/UX User interface and/or user experience
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants