Home Download Buy Blog Forum Support

Sidebar icons in themes

Re: Sidebar icons in themes

Postby pryley on Thu May 08, 2014 12:40 am

Thanks @buymeasoda!

I've changed it to be used as a child theme.
Instructions are in the latest commit comments.
pryley
 
Posts: 4
Joined: Tue May 06, 2014 7:40 pm

Re: Sidebar icons in themes

Postby noirbizarre on Fri May 09, 2014 12:10 am

Thanks for the theme update @buymeasoda and the child theme @pryley !

Is it possible to only have the folder icon without the arrow ?
noirbizarre
 
Posts: 5
Joined: Thu Oct 27, 2011 11:58 am
Location: Paris, France

Re: Sidebar icons in themes

Postby zackzheng on Fri May 09, 2014 7:40 am

How to show 32*32 icons in sidebar? 16*16 is too small to see clearly.
zackzheng
 
Posts: 4
Joined: Wed May 07, 2014 5:06 pm

Re: Sidebar icons in themes

Postby MKANET on Fri May 09, 2014 6:33 pm

I hope I'm not pestering everyone by asking one more time (in case my previous post was overlooked in this thread).

Is anyone using one of the the existing older customized sidebar themes based on:
https://gist.github.com/olivierlacan/1857652

There are several forks based on this. My customized sidebar is also based off those sidebar sub-themes as well.

I'm simply looking for a single updated example Dark.sublime-theme file I can use that also overrides filetype icons.

I downloaded "soda-theme-master.zip" from the link provided in the below post; but, it looks like it's not set up like the downloadable sidebar theme packages mentioned above. Hopefully, someone who has something similar to what I have will share their dark sidebar-override.sublime-theme file (or whatever they call it).

pryley wrote:I like the specified by extension idea!

I've modified the Soda Light theme to support sidebar icons, and also created some custom icons based on Fugue and the Espresso icons.

Normal size:

Image

Retina size:

Image
MKANET
 
Posts: 56
Joined: Fri Aug 30, 2013 5:06 pm

Re: Sidebar icons in themes

Postby zackzheng on Sun May 11, 2014 5:53 am

facelessuser wrote:Jon, another suggestion would be to allow sidebar icons to be specified by extension as well as scope. Scope is fine, but there are a number of file extensions that aren't included by default in tmLanguage files. For this reason, plugins like ApplySyntax have popped up to analyze file extension and set the correct syntax for such files. It is a pain to have to update different tmLanguages to automatically get the correct syntax to open, so defining rules in one place with ApplySyntax, this becomes much less painful. But these file, (files whose syntax is set by an external plugin) don't get the correct icon due to the post processing and setting of the file via an external plugin. Being able to just specify extensions would make this much easier.

For instance. I see you included a binary icon, but currently when a binary view loads, it loads hex data, but the syntax is plain text. Basically, it is impossible to detect binary files with the current system, which I am sure is why no files icons show up as binary. I am pretty sure you plan on using the binary list in the settings file to eventually target binary files, but it would be nice to have a similar functionality for all file type icons.

I think so . BTW, a zip file is show up as binary which use the binary icon. Unexpectly, an exe file is not show up as binary.
zackzheng
 
Posts: 4
Joined: Wed May 07, 2014 5:06 pm

Re: Sidebar icons in themes

Postby jps on Thu May 15, 2014 5:10 am

buymeasoda wrote:I'm a bit stuck with leveraging the new file icon functionality for Soda Theme. Is it possible to allow themes to define the folder where icons are loaded from within the theme context?

With Soda Theme, the light and dark versions of the theme are together, and normally this is fine for assets because their paths are specified in the theme files and kept in separate sub-directories.


One option is to place a do nothing 'Soda Dark 3.sublime-theme' file (i.e., only content should be an empty array: "[]") within the 'Soda Dark' folder, so the Soda Dark folder is considered as a candidate for the icon lookup locations, enabling you to place the file_type_default.png and friends there.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sidebar icons in themes

Postby Mellowfellow on Fri May 16, 2014 11:08 am

I managed to theme the folders too, with:

Code: Select all
[
    // Sidebar folder closed
    {
      "class": "icon_folder",
      "layer0.texture": "User/Theme - Default/icons/folder.png",
      "layer0.opacity": 1.0,
      "content_margin": [8, 8]
      },
    // Sidebar folder open
    {
      "class": "icon_folder",
      "parents": [{"class": "tree_row", "attributes": ["expanded"]}],
      "layer0.texture": "User/Theme - Default/icons/folder_open.png",
      },
]


How can I target .erb files so I can add a icon too them ? I tried "source.rails", "text.html.rails" but it's not working.
Mellowfellow
 
Posts: 3
Joined: Thu May 15, 2014 3:53 pm

Re: Sidebar icons in themes

Postby tito on Sat May 31, 2014 5:23 am

So I have installed a vanilla "Soda - Theme"
I took facelessuser icons (thanks again), and create a dummy folder "Packages/Soda - Theme/icons/" and dropped the icons there. It works, Great! :)
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 851
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Sidebar icons in themes

Postby Orlmente on Sat May 31, 2014 2:29 pm

Mellowfellow wrote:How can I target .erb files so I can add a icon too them ? I tried "source.rails", "text.html.rails" but it's not working.


If you want to add specif icons for specific filetypes you need to:
1) add the respective file_type_%desired file type here%.png and file_type_%desired file type%@2x.png (for retina) it in /package/Theme - %current theme name here%/icons/ folder (if Theme - themename folder does not exist create it yourself)
2) create a new "Icon (%new file type here%).tmPreference" file and put it in either /package/user/ or /package/Theme - %current theme name here%/ forlder.
3) in the newly created "Icon (%new file type here%)" file insert the following:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>scope</key>
    <string>%right scope for file type here%</string>
    <key>settings</key>
    <dict>
        <key>icon</key>
        <string>file_type_%new file type here%</string>
    </dict>
</dict>
</plist>


For the scope of .erb fyles, it should be html.body.ruby, but you can find it both by:
1) looking in the color scheme or language definition files to see which scopes are used for highlight
2) add
Code: Select all
{ "keys": ["ctrl+alt+shift+o"], "command": "show_scope_name" }
to you user's keybindings, create a new .erb fyle and trigger the command to display current scope in the bottom statusbar

hope it helps
Orlmente
 
Posts: 95
Joined: Mon Mar 18, 2013 12:37 pm

Re: Sidebar icons in themes

Postby facelessuser on Sat May 31, 2014 4:05 pm

tito wrote:So I have installed a vanilla "Soda - Theme"
I took facelessuser icons (thanks again), and create a dummy folder "Packages/Soda - Theme/icons/" and dropped the icons there. It works, Great! :)


No problem. The original post link is out dated, here is the updated link https://github.com/facelessuser/Aprosop ... ster/icons for any one else who is desperate to replace the stock icons. They look much better now than they did at the time of the original post.
facelessuser
 
Posts: 1544
Joined: Tue Apr 05, 2011 7:38 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: memomo and 32 guests