Home Download Buy Blog Forum Support

Documentation for Themes in ST2?

Documentation for Themes in ST2?

Postby Mage on Sat May 14, 2011 4:22 pm

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

Image

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.
Mage
 
Posts: 5
Joined: Thu Apr 07, 2011 7:35 am

Re: Documentation for Themes in ST2?

Postby fatalentity on Tue May 17, 2011 2:22 am

WOHA.

How did you change the color of the folders text?
fatalentity
 
Posts: 10
Joined: Sun Jan 23, 2011 10:03 am

Re: Documentation for Themes in ST2?

Postby Mage on Tue May 17, 2011 11:59 pm

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)
Mage
 
Posts: 5
Joined: Thu Apr 07, 2011 7:35 am

Re: Documentation for Themes in ST2?

Postby jps on Wed May 18, 2011 2:40 am

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):

Code: Select all
"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.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Documentation for Themes in ST2?

Postby Kensai on Wed May 18, 2011 4:28 am

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.
Kensai
 
Posts: 33
Joined: Mon Aug 24, 2009 8:19 pm

Re: Documentation for Themes in ST2?

Postby ssteinerX on Wed May 18, 2011 4:51 pm

2060 build!?

My 2059 insists there are no updates available...

Where can I get the newest?

Thanks,

S
ssteinerX
 
Posts: 19
Joined: Tue May 03, 2011 2:50 pm

Re: Documentation for Themes in ST2?

Postby jbjornson on Thu May 19, 2011 6:50 am

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.
jbjornson
 
Posts: 343
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: Documentation for Themes in ST2?

Postby ssteinerX on Fri May 27, 2011 3:59 pm

2060 is the latest stable build and 2059 is the latest dev build.


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
ssteinerX
 
Posts: 19
Joined: Tue May 03, 2011 2:50 pm

Re: Documentation for Themes in ST2?

Postby Kensai on Fri May 27, 2011 6:37 pm

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.
Kensai
 
Posts: 33
Joined: Mon Aug 24, 2009 8:19 pm

Re: Documentation for Themes in ST2?

Postby rdougan on Fri May 27, 2011 10:52 pm

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.. :)
rdougan
 
Posts: 44
Joined: Sat Apr 09, 2011 2:37 am


Return to General Discussion

Who is online

Users browsing this forum: lefoy and 37 guests