Skip to content

Flutter UI Guides are spaced when custom line height is used #1902

Open

Description

@henriquearthur

Flutter UI Guides have a gap between lines when I use a custom line height. Not sure if this is a bug or intended behaviour, but I wish it was a continuous line...

My settings:

"dart.previewFlutterUiGuides": true,
"dart.previewFlutterUiGuidesCustomTracking": true,

I'm on VS Code 1.36.1, Dart-Code extension 3.3.0, Ubuntu 18.04 GNOME.

Custom line height (35):
Captura de tela de 2019-08-02 20-17-37

Default line height (0):
Captura de tela de 2019-08-02 20-17-00

Activity

  1. DanTup commented on Aug 4, 2019

    @DanTup
    Member

    This is unfortunately a known limitation because VS Code doesn't give us a clean way to draw arbitrary lines (so we have to use ascii characters which are the same height as a line).

    I've opened microsoft/vscode#73780 to start a discussion about a better API for things like this, but there hasn't been any response to it so far.

  2. a-eid commented on Dec 26, 2019

    @a-eid

    having the same issue, had to remove the custom line height from my vscode settings for dart.

      "[dart]": {
        "editor.lineHeight": 0,
      }
    
  3. added this to the On Deck milestone on Oct 1, 2020
  4. modified the milestones: On Deck, Backlog on Jul 21, 2021
  5. robertpiosik commented on Sep 29, 2021

    @robertpiosik

    @DanTup Can't we apply transform scaleY on vertical lines?

  6. DanTup commented on Sep 30, 2021

    @DanTup
    Member

    @robertpiosik the lines are rendered from Ascii characters, to changing the size will push the lines further out when there are multiple in the same line (I'm also not certain we can change the scale - we have a very limited set of CSS we can set).

    Perhaps there are other ascii characters that may work better. They're set here:

    I'm open to PRs for small modifications as long as they don't seem to make any cases worse, but generally this feature isn't being developed until there are better APIs as there are many issues that aren't really feasible to solve with the current mechanism.

  7. DanTup commented on Sep 30, 2021

    @DanTup
    Member

    Oops, I thought this issue was #3585 so my response was thinking about scaling in X (making the lines wider).

    Although, generally the response is the same. I don't think we can scale Y using CSS, and if we do make it taller (eg. bigger font size) it would also upset the width of spaces between lines. I am open to PRs if anyone can come up with improvements though - the breaks in lines do very much bug me, but I'd previously spent some time trying various fixes with no luck :-(

  8. robertpiosik commented on Sep 30, 2021

    @robertpiosik

    Such hack does the job with a default line height:

    image

  9. DanTup commented on Sep 30, 2021

    @DanTup
    Member

    @robertpiosik how are you adding that transform to the extension code? We have limited CSS capabilities, we can't just add arbitrary CSS:

  10. robertpiosik commented on Sep 30, 2021

    @robertpiosik

    @DanTup Didn't know about these limited CSS capabilities :(

  11. DanTup commented on Sep 30, 2021

    @DanTup
    Member

    Ah - I thought you'd found something I'd missed. Yeah, it kinda sucks.

    Please do add 👍 's to microsoft/vscode#73780 if you haven't already. A good API from VS Code would make a huge difference here!

  12. added
    in flutterRelates to running Flutter apps
    in editorRelates to code editing or language features
    on Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked on vs code / lsp / dapRequires a change in VS Code to progressin editorRelates to code editing or language featuresin flutterRelates to running Flutter appsis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions