Sublime Forum

Side bar theme not rendering

#1

[size=150]Here’s a snapshot from my Sublime Text 3. I’ve tried many themes trying to change the side bar style. Yet even with themes which style the whole UI, I’m still unable to change the background color of my side bar. What happen?[/size]

[size=150]Note that all UI elements other than sidebar work.[/size]

https://lh3.googleusercontent.com/HnD-kbO1-mKActkl8fd4kYPvSbWYP_l7ChDIYxuKqvA=w1311-h737-no

Here’s some code excerpt from the theme file I’m using:

    // Sidebar container
    {
        "class": "sidebar_container",
        "layer0.texture": "",
        "layer0.opacity": 1,
        "layer0.tint": [10,10,10],
        "layer0.inner_margin": [1,5,2,1],
        "content_margin": [0,4,0,0]
    },

    // Sidebar tree
    {
        "class": "sidebar_tree",
        "row_padding": [8,4],
        "indent":16,
        "indent_offset": 16,
        "indent_top_level": false,
        "dark_content": true
    },

    // Sidebar rows
    {
        "class": "tree_row",
        "layer0.texture": "",
        "layer0.tint": [17,17,17],
        "layer0.opacity": 0,
        "layer0.inner_margin": [1,1]
    },

    // Sidebar row selected
    {
        "class": "tree_row",
        "attributes": "selected"],
        "layer0.opacity": 1
    },

    // Sidebar heading
    {
        "class": "sidebar_heading",
        "color": [210,210,210],
        "font.bold": true,
        "shadow_color": [0,0,0],
        "shadow_offset": [0,0]
    },

    // Sidebar heading selected
    {
        "class": "sidebar_heading",
        "parents": {"class": "tree_row","attributes": "selected"]}],
        "shadow_offset": [0,0]
    },

    // Sidebar entry
    {
        "class": "sidebar_label",
        "color": [125,125,125],
        "shadow_color": [0,0,0],
        "shadow_offset": [0,0]
    },

    // Sidebar folder entry
    {
        "class": "sidebar_label",
        "parents": {"class": "tree_row","attributes": "expandable"]}],
        "color": [190,190,190]
    },
    {
        "class": "sidebar_label",
        "parents": {"class": "tree_row","attributes": "expandable","hover"]}],
        "color": [235,235,235]
    },
    {
        "class": "sidebar_label",
        "parents": {"class": "tree_row","attributes": "expandable"]}],
        "settings": "bold_folder_labels"],
        "font.bold": true
    },

    // Sidebar entry selected
    {
        "class": "sidebar_label",
        "parents": {"class": "tree_row","attributes": "selected"]}],
        "color": [210,210,210],
        "shadow_color": [0,0,0],
        "shadow_offset": [0,0]
    },

    //
    // SIDEBAR - OPEN FILE ICONS
    //

    // Sidebar file close
    {
        "class": "close_button",
        "layer0.texture": "",
        "layer0.opacity": 0,
        "layer0.inner_margin": 0,
        "layer0.tint": [190,90,78],
        "content_margin": [8,8]
    },
    {
        "class": "close_button",
        "parents": {"class": "tree_row","attributes": "hover"]}],
        "layer0.opacity": 1,
        "layer0.texture": "Theme - Cyanide/Cyanide/cross.png"
    },

    // Sidebar file dirty
    {
        "class": "close_button",
        "attributes": "dirty"],
        "layer0.texture": "Theme - Cyanide/Cyanide/circle.png",
        "layer0.opacity": 1,
        "layer0.tint": [182,219,81]
    },
    {
        "class": "close_button",
        "attributes": "dirty"],
        "parents": {"class": "tree_row","attributes": "selected"]}],
        "layer0.texture": "Theme - Cyanide/Cyanide/cross.png"
    },
    {
        "class": "close_button",
        "attributes": "dirty"],
        "parents": {"class": "tree_row","attributes": "hover"]}],
        "layer0.texture": "Theme - Cyanide/Cyanide/cross.png",
        "layer0.opacity": 1
    },

    // Sidebar file close hover
    {
        "class": "close_button",
        "attributes": "hover"],
        "layer0.texture": "Theme - Cyanide/Cyanide/cross.png"
    },
    {
        "class": "close_button",
        "parents": {"class": "tree_row","attributes": "hover","selected"]}],
        "layer0.texture": "Theme - Cyanide/Cyanide/cross.png",
        "layer0.opacity": 1
    },

    //
    // SIDEBAR - GENERAL FILE ICONS
    //

    // Sidebar icons
    {
        "class": "icon_file_type",
        "content_margin": [0,0]
    },
    {
        "class": "icon_folder",
        "content_margin": [0,0]
    },
    {
        "class": "icon_folder_loading",
        "content_margin": [0,0]
    },

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

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

#2

Hi, I’m no coder, only using ST3 for prose writing, but here’s what I have in my theme.default file to change color of sidebar:

// Sidebar tree

{
“class”: “sidebar_tree”,
“row_padding”: [8, 3],
“indent”: 12,
“indent_offset”: 17,
“indent_top_level”: false,
“layer0.tint”: [230, 230, 230],
“layer0.opacity”: 1.0,
“dark_content”: false
},

The color RGB is defined in the line “layer0.tint”, in my case its: 230/230/230

Hope this is what you looking for?

I got this tip from somebody this forum but dont remember the name. But thanks to mr. unknown.

I first used this in ST2 but I tried also in ST3 and it works !

0 Likes

#3

Thanks! This is very helpful.
I figured out why my sidebar wasn’t rendered. Sidebar is rendered only after I restart ST.
Sorry for such stupid question.

0 Likes