Sublime Forum

Documentation for Themes in ST2?

#1

I was wondering about themes for ST2 and started working on making my own (albeit bad) theme:

I’m wondering if there’s any documentation to the configuration file for this, mainly so I can figure out what can do images (like the sidebar perhaps for a right-edged border) or other things of that nature.

I was also wondering if whether or not using a sprite is possible over individual files.

0 Likes

#2

WOHA.

How did you change the color of the folders text?

0 Likes

#3

It’s in the Theme - Default Directory under Default.sublime-theme

You can edit colors/files/etc. there or copy the entire dir and do your own time (like I am doing, notice the tabs too)

0 Likes

#4

The core of the way the theming works in how images are drawn. Here’s an example that’s used for each row of the quick panel (i.e., Goto Anything):

"layer0.texture": "Theme - Default/quick_panel_row.png",
"layer0.inner_margin": [0, 0, 0, 3],
"layer0.draw_center": false

The inner_margin specifies 4 values: left, top, right, bottom. It specifies how the image is stretched over the control area. If all the values are 0, then the imaged is simply scaled to the size of the control and drawn.

Most images have some sort of border area, which shouldn’t be stretched, and a center area, which should be. The inner_margin specifies the size of this border area. In the case of quick_panel_row.png, it’s a simple flat image with a 2px border at the bottom. The inner_margin specifies that the bottom 3 pixels of the image shouldn’t be scaled, but the rest can be.

The draw_center flag is an optimisation. The inner_margin setting divides the image up into 9 areas: 4 corners, 4 edges, and a center portion. If the center portion doesn’t need to be drawn (in the case of the quick panel, the center portion is the same color as the background, and so doesn’t need to be drawn), then draw_center can be set to false.

fatalentity: the “sidebar_heading” class can be used to change the appearance of “FOLDERS” etc.

0 Likes

#5

And I notice in the 2060 build that we can now get the labels for items below Folders to change color properly.

Its a thing of beauty now, thank you sir.

0 Likes

#6

2060 build!?

My 2059 insists there are no updates available…

Where can I get the newest?

Thanks,

S

0 Likes

#7

2060 is the latest stable build and 2059 is the latest dev build. You are only alerted of the newer builds for your type of build. I personally think that this is wrong and the auto-update (and the download page on the website) for dev should include both the development and the stable builds.

0 Likes

#8

Why the heck would the latest stable be ahead of the latest dev?

So, I’m running the latest “dev” build, but it’s older? That’s just silly and completely counter-intuitive…

And…I don’t see anywhere to download the “latest stable” on the downloads page, just 2059.

Where can I get this “ahead of the dev build” “stable build”, please?

S

0 Likes

#9

Find the last post announcing a new build and then follow the link provided. That’s how I discovered 2060 was there. I’m sure that last post is on the second page of General Discussion by now, and I think the link in the initial post is labeled for 2057, but it points to the same location.

Everybody relax.

0 Likes

#10

Full control over text, and selected text in the sidebar tree and tabs would be super nice (font-size, text-shadow). It would be even better if the syntax was CSS… :smile:

0 Likes