glance icon indicating copy to clipboard operation
glance copied to clipboard

Options for source code previews

Open samuelmeuli opened this issue 4 years ago • 5 comments

I'd like to avoid introducing options as much as possible. So far, Glance doesn't have any options at all. It might be best to keep it this way.

Source code settings which I think might be worth considering:

  • Line numbers: Currently no line numbers
  • Line wrapping: Currently no line wrapping
  • Font size: Currently an approximation of Xcode's default font size
  • Tab size: Currently 4 (Xcode default)

Attributes which I think should not be configurable:

  • Color scheme: Glance uses colors of the default Xcode light/dark themes.
  • Font family: Glance currently uses Menlo. I would like to switch to SF Mono (Apple's new default monospaced font), but there doesn't seem to be a way to select the system's monospaced font with CSS.

Requested on Reddit and in App Store reviews.

samuelmeuli avatar May 17 '20 12:05 samuelmeuli

Can we also implement text selection with copy feature?

s-r-aman avatar May 17 '20 13:05 s-r-aman

Can we also implement text selection with copy feature?

I've created a new issue for this request: #13

samuelmeuli avatar May 18 '20 12:05 samuelmeuli

Hey there! First of all: really like the idea of an all-in-one QL plugin. 👍

You mentioned QLColorCode here. There's another project for source code files which is fairly new but awesome. Check out SourceCodeSyntaxHighlight. It supports a lot of customizations, including not only line count and tab size but furthermore themes, extra settings per filetype and much, much more.

lutzthies avatar May 19 '20 08:05 lutzthies

If I’m not mistaken, it seems that Glance’s source code/text previews have some extra padding around the content. This might be another good candidate for the list of settings, since it doesn’t seem like Apple adds any padding around their default previews.

(I can follow up again at a later time with screenshots if it isn’t clear what I mean by padding)

kieranju avatar May 19 '20 09:05 kieranju

Attributes which I think should not be configurable: color scheme, font family

I would like to customize syntax highlighting color scheme and font to make it consistent across my text editors and other apps. Why not?

andreiborisov avatar Jul 03 '20 13:07 andreiborisov