Skip to content

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.

Co-Authored-By: Tyrannicodin <86689800+Tyrannicodin@users.noreply.github.com>
@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
Contributor

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
Contributor

something something test :) b1bae1f

CyanVoxel and others added 2 commits October 12, 2024 15:50
Co-Authored-By: yed <yedpodtrzitko@users.noreply.github.com>
@CyanVoxel
Copy link
Member Author

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

Copy link
Contributor

@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.

3 participants