CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

Correctly preview non-text files

Open plbstl opened this issue 1 year ago • 2 comments

Description

This PR allows CodeEdit to also open non text files correctly.

All the file formats in the related issue #1698 were tested.

Related Issues

  • #1698

Checklist

  • [x] I read and understood the contributing guide as well as the code of conduct
  • [x] The issues this PR addresses are related to each other
  • [x] My changes generate no new warnings
  • [x] My code builds and runs on my machine
  • [x] My changes are all related to the related issue above
  • [x] I documented my code

Screenshots

QuickLook doesn't load until the Git branch shows up:

https://github.com/CodeEditApp/CodeEdit/assets/49006567/fcfdcd56-0346-4030-9d06-002e26a70d98

plbstl avatar May 10 '24 18:05 plbstl

Looks like there's an issue with our CI, it might need an update, which would explain the failing test.

thecoolwinter avatar May 10 '24 19:05 thecoolwinter

Nice work! I can't pull it down now but just so you are aware, images should show full pixels (not scaled up to fit if smaller than window). If it is too big for the window it should scale down to fit. We could later add some small controls to adjust the zoom levels and have buttons for 1x, 2x, and 3x.

austincondiff avatar May 10 '24 20:05 austincondiff

images should show full pixels (not scaled up to fit if smaller than window). If it is too big for the window it should scale down to fit

Yes, this PR does that. Implementing it was really hard for me and it took the most time, but I'm happy it did so without a really complex logic.

CodeEdit/Features/Editor/Views/ImageFileView.swift

plbstl avatar May 11 '24 11:05 plbstl

@allcontributors add @plbstl for bug

austincondiff avatar May 11 '24 20:05 austincondiff

@austincondiff

I've put up a pull request to add @plbstl! :tada:

allcontributors[bot] avatar May 11 '24 20:05 allcontributors[bot]