microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.87k stars 29.15k forks source link

Code Lens's is not vertically middle #19979

Closed pouyakary closed 7 years ago

pouyakary commented 7 years ago

I think @joaomoreno get's me in this problem: References are aligned on top of a div when you have line-height. Which is a bit bad because you think it's about the upper line.

screen shot 2017-02-05 at 6 53 11 pm

Now if it be vertically middle like this:

screen shot 2017-02-05 at 6 53 11 pm

It can be much better. I don't know if it's possible but I think a simple vertical-align: middle should solve it right?

pouyakary commented 7 years ago

@alexandrudima I somehow could have guessed :D

alexdima commented 7 years ago

@pmkary What settings are you using? I've tried with:

    "typescript.referencesCodeLens.enabled": true,
    "editor.lineHeight": 50

on master, and interestingly, it appears to be bottom-aligned:

image

pouyakary commented 7 years ago

This is the whole settings file. If there was any other info needed please tell me

{
  "editor.fontSize": 13,
  "terminal.integrated.fontSize": 14,
  "editor.lineHeight": 25,
  "editor.fontFamily": "Hasklig-Medium",
  "editor.fontLigatures": true,
  "editor.tabSize": 4,
  "editor.wrappingColumn": 0,
  "editor.wrappingIndent": "same",
  "editor.quickSuggestionsDelay": 0,
  "editor.renderWhitespace": false,
  "editor.insertSpaces": true,
  "dafny.dafnyServerPath": "~\/dafny\/DafnyServer.exe",
  "window.reopenFolders": "all",
  "window.openFilesInNewWindow": false,
  "workbench.statusBar.visible": true,
  "window.titleBarStyle": "native",
  "cSpell.enabledLanguageIds": [
    "csharp",
    "go",
    "javascript",
    "javascriptreact",
    "markdown",
    "php",
    "plaintext",
    "text",
    "typescript",
    "typescriptreact",
    "yml",
    "ruby",
    "pageman",
    "html"
  ],
  "typescript.check.tscVersion": false,
  "workbench.editor.sideBySideLayout": "horizontal",
  "window.zoomLevel": 0,
  "editor.mouseWheelZoom": false,
  "git.confirmSync": false,
  "workbench.activityBar.visible": true,
  "workbench.sideBar.location": "left",
  "workbench.welcome.enabled": true,
  "typescript.referencesCodeLens.enabled": true
}
alexdima commented 7 years ago

Thank you, I could reproduce with your settings.

Here's how it looks with the fix: image

pouyakary commented 7 years ago

@alexandrudima thanks a lot for the fix 👍 ❤️

Additionally I think you should include the Hasklig font in your tests because I previously found a bug: #13503 which was also fixed when dear João Moreno used the font and found the bug. (which was the reason I mentioned him in the first place.)