Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST4 - Line annotation background color looks ugly #552

Closed
pvanb opened this issue Jun 19, 2020 · 5 comments
Closed

ST4 - Line annotation background color looks ugly #552

pvanb opened this issue Jun 19, 2020 · 5 comments
Labels

Comments

@pvanb
Copy link

pvanb commented Jun 19, 2020

Description

With the newest version of GitGutter the line annotations for ST4 use the background color of the current color scheme, but this looks ugly when using the "highlight_line": true option.

Screen Shot 2020-06-19 at 7 25 33 PM

I propose either the background be set back to transparent (as it is in ST3) or have it be configurable in the same way the foreground is:

"rules":
[
	{
		"scope": "comment.line.annotation.git_gutter",
		"foreground": "#586e75",
		"background": "#073642", // or just "transparent"
	}
]

Support Info

  • Sublime Text 4074
  • Platform: osx
  • Arch: x64
  • GitGutter 1.11.2
  • Install via PC: True
  • git version 2.24.3 (Apple Git-128)
  • mdpopups 3.7.1
  • markdown 3.1.1
  • pygments 2.1a0
  • jinja2 2.10.1
@kqf
Copy link

kqf commented Dec 25, 2021

@deathaxe I've just updated to ST4 and I am still having this issue. I probably overlooked something, but could you tell me how to fix that?

image

Another question is, why the text is so indented to the right if compared to the SBT3 version:
image

I have removed the commit has from the annotations although this didn't help much.

EDIT: In both cases I have the default option"line_annotation_ruler": false, but this still appears 😢

Support Info

  • Sublime Text 4126
  • Platform: osx
  • Arch: x64
  • GitGutter 1.11.7
  • Install via PC: True
  • git version 2.32.0 (Apple Git-132)
  • mdpopups 4.2.1
  • markdown not installed!
  • pygments not installed!
  • jinja2 2.10.1

@deathaxe
Copy link
Collaborator

The transparent background color applied by 9017050 caused rendering issues when hovering the annotation with some builts of ST4 and was therefore reverted by 8b5dd23. It appears ST4126 handles them correctly again.

GitGutter uses normal phantoms when running with ST3. They suffer some edge cases with soft wrapped lines. SublimeHQ's solution for this issue is a new feature called "annotations" in ST4. These are phantoms located at the very right edge of a view, which optionally create popups when hovering. A plugin can't control the location nor the amount of text being displayed.

The "line_annotation_ruler" specifies whether the annotation text starts right at the end of a line or not before a ruler's column (if one is set up). GitGutter prepends spaces to achieve that. As this is used by normal phantoms, the setting applies to ST3 only.

It may be required to close and reopen a view or restart ST to make some of those settings apply after a change as GitGutter caches many of them to avoid creating required templates after every key press. As those settings don't change frequently I haven't put any effort into fixing those caching edge cases.

@kqf
Copy link

kqf commented Dec 26, 2021

@deathaxe Thank you for taking your time to answer my questions. I understood the part about "line_annotation_ruler", but I still don't know how to solve the background color issue. Is it solvable or not?

PS: I still prefer GitGutter over the incremental diff ❤️

@deathaxe
Copy link
Collaborator

The background color is hardcoded. You could have a look at the commits and patch the files yourself. As most recent ST4 is able to handle transparent well again, I am fine to revert the latter one again.

@kqf
Copy link

kqf commented Dec 26, 2021

Now I got it, thanks. I will play myself and probably let you know (probably tomorrow or later this week) in this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants