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

option to manually adjust the horizontal padding #3633

Open
snoblenet opened this issue Jun 3, 2024 · 10 comments
Open

option to manually adjust the horizontal padding #3633

snoblenet opened this issue Jun 3, 2024 · 10 comments
Labels
enhancement New feature or request

Comments

@snoblenet
Copy link

The vertical padding between panel in LazyGit appears to be two lines.

The horizontal padding appears to be one character.

I presume this is because both are set to the smallest practical value, to save screen real estate.

But for purely aesthetic reasons, I would like the option of manually overwriting the value for horizontal padding.

I don't yet know whether I would then personally settle on two characters for the width, or three characters because of the adjust_line_height 4 in my kitty.conf. But either way, I would very much value the opportunity to experiment and decide.

@snoblenet snoblenet added the enhancement New feature or request label Jun 3, 2024
@belyakov-am
Copy link
Contributor

I like this one very much!

Willing to implement if the codeowners approve

@snoblenet
Copy link
Author

I haven't done much work with Go but I can certainly download any feature branch you come up with @belyakov-am and give feedback and review PR on that basis if permitted to do so.

@snoblenet
Copy link
Author

As part of your work on this PR, you may want to consider applying the horizontal padding setting to the left of Squash and to the right of 0.42.0.

image

@stefanhaller
Copy link
Collaborator

The vertical padding between panel in LazyGit appears to be two lines.

The horizontal padding appears to be one character.

I'm having trouble understanding what this means. Right now, there's no padding between panels, neither vertical nor horizontal.

Could you illustrate what you mean with a screenshot or two?

@stefanhaller
Copy link
Collaborator

As part of your work on this PR, you may want to consider applying the horizontal padding setting to the left of Squash and to the right of 0.42.0.

There used to be a space to the left and right of that bottom line. We removed it in #3076, and there's a little bit of discussion about it here (not much, unfortunately, most of the conversation was done in person.)

@snoblenet
Copy link
Author

Hi @stefanhaller . Maybe technically there is no padding between the box-drawing characters used to draw the boarders, but from a graphic design point of view, it looks like padding. I've used pink lines in this screenshot to show what the mind interprets as vertical and horizontal padding.

image

@snoblenet
Copy link
Author

Similar vein -- this would be much easier to read if there was a single space between each file/directory icon and the name of the file/directory.

image

This screenshot of oil.nvim shows the alternative:

image

@stefanhaller
Copy link
Collaborator

I see, thanks for explaining. It shouldn't be super hard to add this; the code is here. For experimentation (draft PR) I'd probably change the code directly in the vendor directory; once we have something that we're happy with, it would have to become a PR in the lazycore repo.

Similar vein -- this would be much easier to read if there was a single space between each file/directory icon and the name of the file/directory.

There is already a single space between the icon and the name, it just isn't visible for you because your font is so narrow. In the screenshot above, you can tell that the "ts" icon lines up with the "c" of "core" above it, and the "createCo..." lines up with the "r" in "core"; that's two positions apart. The "ts" icon just has a width of two characters in your font.

Here's what it looks like with my font:
image

Making the width between icon and name configurable to cater to fonts like yours seems to take it a bit too far for my taste.

I do however think that we should use the folder icon of the last screenshot, it looks better than ours.

@snoblenet
Copy link
Author

I'm a big believer in "if you want it, you build it".

I also have near zero experience with Go.

I'm not 100% sure from the wording of your latest PR whether you suggesting I should personally have a go at creating the draft feature branch?

My font is the Nerd Font patched version of Victor Mono. Kitty settings control much of how it is presented. Is it a "normal" space between the icon and the name? I suspect the space is being presented normally by Kitty, but the icon before is overlapping the next character.

@stefanhaller
Copy link
Collaborator

I'm not 100% sure from the wording of your latest PR whether you suggesting I should personally have a go at creating the draft feature branch?

I wasn't suggesting anything; whoever wants to give it a go is free to try it. It sounded like @belyakov-am was interested, but if you want to, feel free.

But I now got interested myself, not because I want the feature, but because I'm hoping this might simplify the code in infoSectionChildren if we can just set the padding for that bottom line view to 1, eliminating the need for all those spacer views.

So I just spent a few minutes on trying it, and pushed the result as a box-view-padding branch. Feel free to take it from there; it feels almost done to me, what's missing is a few tests in window_arrangement_helper_test.go, and it seems that the renderLayout function in that test needs to be adapted in some way (I couldn't immediately see how, and now my time budget ran out).

I didn't do anything to the infoSectionChildren function yet, and I think this could be done in a separate PR later.

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

No branches or pull requests

3 participants