Sublime Forum

Sidebar increased padding

#1

With the recent update I’m seeing a huge amount of padding in the sidebar (top and left). How do you remove this?

0 Likes

#2

Yeah, I’m also not much of a fan of the increased padding.

I created a new directory here:
%appdata%\Sublime Text 3\Packages\adaptive2

I opened up this file in 7-Zip:
C:\Program Files\Sublime Text 3\Packages\Theme - Default.sublime-package

I extracted the contents of \adaptive to my new \adaptive2

I renamed the theme in \adaptive2 to “Adaptive2.sublime-theme”

I opened up the .sublime-theme file. On line 53, you will see “row_padding”: [16, 4, 16, 4],

Change the 4’s to whatever you want.

That will fix the padding issues.

0 Likes

#3

With themes you can create Packages/User/Adaptive.sublime-theme and add rules to make changes you want.

2 Likes

#4

Is this intentional? That’s a good 10+px of wasted horizontal and vertical space.

0 Likes

#5

I don’t think it’s the row padding, its the padding above and to the left of FOLDERS and the tree.

0 Likes

#6

Awesome, even better!

0 Likes

#7

Make a Packages/User/Adaptive.sublime-theme and add the following to it:

[
    {
        "class": "sidebar_container",
        "content_margin": -8
    },
    {
        "class": "sidebar_tree",
        "row_padding": [16, 1, 16, 1],
        "indent_offset": 8
    }
]

The first one pushes FOLDERS up to the top-left. The second one sets the row padding to 1px and fixes to offset to counter-act the negative margin from the first one.

0 Likes

#8

Fantastic, took a little bit for subl to pick it up but this is fab. May not look as pretty, but very functional.

1 Like

#9

I discovered you can actually control it a little better:

[
    {
        "class": "sidebar_container",
        "content_margin": [-12, -7, 0, 0]
    },
    {
        "class": "sidebar_tree",
        "row_padding": [16, 1, 16, 1],
        "indent_offset": 13
    }
]

By tweaking X/Y paddings individually, you can align it much better.

0 Likes

#10

Yes, I wanted to give the sidebar a little more breathing room, as it was very tight. The new theme feels like a better out-of-box experience, and more of a modern interface.

With the theme customization functionality available, it is pretty easy to tweak. And I see that you’ve obtained the results you want! :smiley:

3 Likes

#11

Quick quiz: In what folder is ErrorMessage.js located?

  • src
  • components
  • Panel
  • images

0 voters

View the solution (after answering above)

Did you think ErrorMessage.js was located under the Panel folder? Wrong! It’s actually located under the components folder. This whitespace indentation is rather unintuitive (even though I appreciate it was an attempt to align the text names of each item under a folder, so they vertically align). IMHO, it would be better if the names of items in a folder was left-adjusted so they line up with the folder icons contained within the same folder.

For reference, I’m using “Soda Dark 3.sublime-theme”.

0 Likes

#12

I still wish SublimeHQ would implement some simple lines:

1 Like

#13

@wjdp Would you mind sharing the config you used to get the sidebar like that?

0 Likes

#14

I quick-fixed this issue by creating a file here (with the same name as the theme I’m using):
~/Library/Application Support/Sublime Text 3/Packages/User/Soda Dark 3.sublime-theme

And copied little bit of the content from: ~/Library/Application Support/Sublime Text 3/Packages/Theme - Soda/Soda Dark 3.sublime-theme into the aforementioned file.

So that it contains merely:

[
    // Sidebar file icons
    {
        "class": "icon_file_type",
        // layer0.texture is filled in by code with the relevant icon name
        "layer0.opacity": 1.0,
        "content_margin": [0, 8]
    },
]

Where I changed content_margin from [8, 8] to [0, 8]. So that it overrides the theme with that bit.

It solved it adequately enough for me (even though I would have liked to be able to set a negative value):

0 Likes

Overwrite theme options in settings
#15

You can find my sublime config here: https://github.com/wjdp/dotfiles/tree/master/sublime hopefully the answers are in there!

1 Like