Sublime Forum

Can we have an option to hide the sidebar disclosure arrows?

#1

Now that we have sidebar icons with folders that have open and closed states, the disclosure arrows are not really necessary and just take up more sidebar real-estate…especially in a project with many levels deep (yes I know about CMD+T, but I’m talking about the sidebar right now).

Can we have an option to hide the sidebar disclosure buttons (arrows), or is this possible through theming?

Example:

THIS:

VS. THIS:

0 Likes

Soda Theme - New features and ST3 support
#2

+1 on that

0 Likes

#3

It’s already possible to hide them throught theming,
there are 2 things you have to take care of:

"class": "sidebar_tree",
"indent": 0, // original value is 16
...
"class": "disclosure_button_control",
"content_margin": [0,0], // original value is [8,8]
...

doing so will hide disclosure controls from sidebar.

1 Like

#4

Thanks :smile:

It should be noted that setting

"class": "sidebar_tree",
"indent": 0, // original value is 15
...

will remove the indentation of child folders, which is slightly confusing to me. So I chose to leave “indent” at 15, which, incidentally, seems to be the current default value.

I was not sure where to make this correction, so for future reference:

know that your ‘Installed Packages/Theme - Soda.sublime-package’ is really just a zip file. If you unpack it and put the decompressed files into ‘Packages/Theme - Soda’, they will override their counterparts in ‘Installed Packages/Theme - Soda.sublime-package’.
(ref.: Packages - Overriding Files From a Zipped Package)
Knowing that, here’s how to make this correction:

  1. Locate the soda theme package file (usually found in ‘Installed Packages/Theme - Soda.sublime-package’)

  2. Make a folder in ‘Packages’ named the same as your package minus the extension - in this case, that would be ‘Packages/Theme - Soda’

  3. I have sublime Text 3, so I decompress ‘Installed Packages/Theme - Soda.sublime-package’ and copy ‘Soda Light 3.sublime-theme’ to ‘Packages/Theme - Soda’ (If I had ST2, I would assume I would copy ‘Soda Light.sublime-theme’ instead)

  4. Edit ''Packages/Theme - Soda/Soda Light 3.sublime-theme as described above and hit save

  5. Restart Sublime

0 Likes

#5

I don’t know about Soda, but here’s a better way that preserves indentation in the default theme:

{ "class": "sidebar_tree", "indent_offset": 0, //original is 17 ...
And instead of adjusting content_margin you can do it by opacity if you want:

[code]
// Normal
{
“class”: “disclosure_button_control”,
“layer0.opacity”: 0.0, //original is 1.0

},

// While hovering
{
“class”: “disclosure_button_control”,
“parents”:

“layer1.opacity”: 0.0 //original is 1.0
…[/code]If you don’t change the hovering one then the arrows will only show up when you hover.

0 Likes

#6

Changing the indetation, as Inkling said, was meant to adjust label’s position when disclosure buttons are hidden/missing,
I think it depends from theme to theme (I tried on my own theme and identation change was needed).
Edit: “indent_offset” seems to move ALL the content of the sidebar, while “indent” only moves the label controls, so you have 2 different option to adjust horizontal position…

Anyway also setting opacity to 0 is a solution…
In addition, you can also setup a theme setting to toggle them just add another “disclosure_button_control” after the original one with:

{
  "class": "disclosure_button_control",
  "settings": "hide_disclosure_buttons"],
  "content_margin": [0,0]
  // or "layer0.opacity": 0.0 if you simply wants to hide them
}

and, if you want to adjust label’s position also a new “sidebar_tree” block after the former one with:

{
  "class": "sidebar_tree",
  "settings": "hide_disclosure_buttons"],
  "indent": 0
 // or "indent_offset": 0 ...
}

then in you User setting just add:

"hide_disclosure_buttons":true // don't forget to add trailing comma if it's not set as last property in the json

to hide them…

0 Likes

#7

Hi pryley, How do you change the file type icon ??

I really want to known. THX

0 Likes

#8

[quote=“WensonSmith”]Hi pryley, How do you change the file type icon ??
I really want to known. THX[/quote]

viewtopic.php?f=2&t=15971&start=30&hilit=sidebar+icons

0 Likes