Home Download Buy Blog Forum Support

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

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

Postby pryley on Tue May 06, 2014 8:06 pm

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:

Image

VS. THIS:

Image
pryley
 
Posts: 4
Joined: Tue May 06, 2014 7:40 pm

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

Postby HansCz on Sat Jun 07, 2014 8:35 pm

+1 on that
HansCz
 
Posts: 3
Joined: Sat Jun 07, 2014 8:32 pm

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

Postby Orlmente on Sat Jun 07, 2014 9:32 pm

It's already possible to hide them throught theming,
there are 2 things you have to take care of:
Code: Select all
"class": "sidebar_tree",
"indent": 0, // original value is 16
...

Code: Select all
"class": "disclosure_button_control",
"content_margin": [0,0], // original value is [8,8]
...

doing so will hide disclosure controls from sidebar.
Orlmente
 
Posts: 100
Joined: Mon Mar 18, 2013 12:37 pm

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

Postby HansCz on Tue Jun 10, 2014 1:41 am

Thanks :)

It should be noted that setting
Code: Select all
"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
HansCz
 
Posts: 3
Joined: Sat Jun 07, 2014 8:32 pm

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

Postby Inkling on Tue Jun 10, 2014 9:33 am

I don't know about Soda, but here's a better way that preserves indentation in the default theme:
Code: Select all
{
  "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: Select all
// 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
  ...
If you don't change the hovering one then the arrows will only show up when you hover.
Inkling
 
Posts: 4
Joined: Mon Dec 09, 2013 6:24 am

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

Postby Orlmente on Tue Jun 10, 2014 10:57 am

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:
Code: Select all
{
  "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:
Code: Select all
{
  "class": "sidebar_tree",
  "settings": ["hide_disclosure_buttons"],
  "indent": 0
// or "indent_offset": 0 ...
}


then in you User setting just add:
Code: Select all
"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...
Orlmente
 
Posts: 100
Joined: Mon Mar 18, 2013 12:37 pm

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

Postby WensonSmith on Sun Jun 22, 2014 4:25 pm

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

I really want to known. THX
WensonSmith
 
Posts: 2
Joined: Wed Nov 14, 2012 2:09 am

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

Postby Orlmente on Sun Jun 22, 2014 4:45 pm

WensonSmith wrote:Hi pryley, How do you change the file type icon ??
I really want to known. THX


viewtopic.php?f=2&t=15971&start=30&hilit=sidebar+icons
Orlmente
 
Posts: 100
Joined: Mon Mar 18, 2013 12:37 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], skube and 22 guests