Sublime Forum

(Solved) Cyanide Theme File Icon Indentation

#1

Hey all,

I recently fell in love with and installed the Cyanide theme found here but I do have one problem with it.

36%20PM

As you can see in the picture, the file icons are indented further than the folder icons even though they’re in the same directory. Ideally, I’d want them to line up like the photo found in this theme (sorry for the link, as a new user I can only post one photo).

Would anyone know how to achieve that? I tried reading the sublime docs for themes and even playing around with content margins, to no avail.

Thanks in advance!

0 Likes

#2

The indention issue you see is caused by the theme using the folder icon as disclosure_button, while Sublime Text provides the folder_icon class for that purpose.

To fix that issue, you can create an overide file in your user package (Packages/User/Cyanide - [name].sublime-theme) with the following content.

{
    // http://www.sublimetext.com/docs/3/themes.html
    "variables": {

    },
    "rules": [

        {
            "class": "disclosure_button_control",
            "content_margin": [0,0],
        },

        // Sidebar group closed
        {
            "class": "icon_folder",
            "content_margin": [8,8],
            "layer0.texture": "Theme - Cyanide/Cyanide/centurion-folder-closed.png",
            "layer0.tint": [250,47,0],
            "layer0.opacity": 1,
            "layer0.inner_margin": 0
        },
        {
            "class": "icon_folder",
            "parents": [{"class": "tree_row","attributes": ["hover"]}],
            "layer0.tint":[250,47,0]
        },
        {
            "class": "icon_folder",
            "parents": [{"class": "tree_row","attributes": ["selected"]}]
        },

        // Sidebar group open
        {
            "class": "icon_folder",
            "attributes": ["expanded"],
            "layer0.texture": "Theme - Cyanide/Cyanide/centurion-folder-open.png"
        },
        {
            "class": "icon_folder",
            "attributes": ["expanded"],
            "parents": [{"class": "tree_row","attributes": ["hover"]}]
        },
        {
            "class": "icon_folder",
            "attributes": ["expanded"],
            "parents": [{"class": "tree_row","attributes": ["selected"]}],
            "layer0.texture": "Theme - Cyanide/Cyanide/centurion-folder-open.png"
        },
    ],
}

Note: the content displayed works with ST 3.2+, only.

1 Like

#3

Thank you so much!! That works perfectly! :slight_smile:

Edit: actually, quick thing: when opening a folder, the icon doesn’t switch to the “open” texture. Any idea as to why? I’ll keep playing with it but maybe it’s more obvious to you

Edit Edit: changed
"attributes": ["expanded"]
to
"parents": [{ "class": "tree_row", "attributes": ["expanded"]}]

and they open now :slight_smile: against thank you so much!! It’s finally perfect

0 Likes