Sublime Forum

Branch status bar icon in theming

#1

Hi guys.

I have been work in a new Theme for Sublime Text, and I have a question…

I can change the icon for Branch in the status bar?

1 Like

#2

Yes, you can. The class is vcs_branch_icon. I haven’t added the theme docs for the git integration yet since we are still in-progress.

1 Like

#3

Thanks a lot @wbond

0 Likes

#4

@wbond another question. Is it possible to send a color, for example, to the settings for the theme? just like with settings (true or false)

0 Likes

#5

You can use colors from the user’s color scheme. You have access to a number of colors with the dev builds: https://www.sublimetext.com/docs/3/dev/themes.html#color_values. For stable builds, you can reference the foreground, background and accent colors only. With dev builds you can get at the predefined color vars (redish, bluish, etc).

2 Likes

#6

Hi @wbond can you help me, with other class in status bar?

I can change the color of this border?

0 Likes

#7

There is a prop called "border_color" in the vcs_changes_annotation:
{
“class”: “vcs_changes_annotation”,
“border_color”: “hsla(217, 15%, 45%, 0.75)”,
“content_margin”: [3, 0, 3, 0]
}
You can get rid of this border altogether by setting alpha to zero as I did.
@wbond it would be nice to style this as inverted label that is dark text on a light background box for a dark theme and vice versa for a light theme. I tried messing around with layers and tint but it’s not working

1 Like

#8

background_color should do what you want. Since this is a text control there are no layers.

0 Likes

#9

thanks @websash and @wbond

0 Likes