Home Download Buy Blog Forum Support

Greetings, and a couple of questions

Greetings, and a couple of questions

Postby rulfzid on Thu Aug 20, 2009 10:14 pm

Hi all,

I'm new to Sublime Text, but so far I'm loving it. I've never seen anything quite like it on Windows in terms of features, speed, customizability, and aesthetics. In fact, I'm partway to completing a theme of my own (it's a thing I do), and if it turns out well, I'll release it.

My favorite "wow factor" feature so far is the minimap, which is brilliant. I've already hidden my scrollbar, and I was wondering if there was a way to make it appear on the right side of the screen instead of the left? I'm just so accustomed to sending my mouse to the right edge of the screen to scroll - it seems better to work with that behavior instead of trying to train myself out of it.

Also, I've looked around and can't seem to find theming docs. I've been poking through Default.sublime-theme, of course - is that a complete list of all possible theming options? And can somebody please enlighten me as to what the various "XShader" (where X is "Texture", "Color", etc.) do?

Thanks again for this program, it's making me have fun with this stuff again.

-rulfzid
rulfzid
 
Posts: 9
Joined: Thu Aug 20, 2009 10:06 pm

Re: Greetings, and a couple of questions

Postby EJ12N on Fri Aug 21, 2009 2:43 pm

rulfzid wrote:Hi all,

I'm new to Sublime Text, but so far I'm loving it. I've never seen anything quite like it on Windows in terms of features, speed, customizability, and aesthetics. In fact, I'm partway to completing a theme of my own (it's a thing I do), and if it turns out well, I'll release it.

My favorite "wow factor" feature so far is the minimap, which is brilliant. I've already hidden my scrollbar, and I was wondering if there was a way to make it appear on the right side of the screen instead of the left? I'm just so accustomed to sending my mouse to the right edge of the screen to scroll - it seems better to work with that behavior instead of trying to train myself out of it.

Also, I've looked around and can't seem to find theming docs. I've been poking through Default.sublime-theme, of course - is that a complete list of all possible theming options? And can somebody please enlighten me as to what the various "XShader" (where X is "Texture", "Color", etc.) do?

Thanks again for this program, it's making me have fun with this stuff again.

-rulfzid


Am afraid your request only Jon himself can answer it, I don't *think* is possible to put minimap on the right without some sort of source modification to sublime.
and about themeing is a very obscure subject as there's no docs or many examples to learn from :/
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Greetings, and a couple of questions

Postby jps on Tue Sep 08, 2009 11:22 am

Hi rulfzid, and a belated welcome to the forums!

There's no way currently to place the minimap on the right hand side of the screen, but I added an item for it to my todo list.

I'm not happy with the current theme file format, it's not particularily flexible, and in need of replacement - but for what it's worth, a bit of documentation:

Each of the shader definitions specify a way to draw a rectangular area on screen. There are a few different types of shaders:
- ColorShader. This takes a single parameter, which is the color to draw.
- SimpleTextureShader. This takes the name of an image file, and a bool indicating if it should be alpha-blended over the background, or simply overwrite the background.
- SimpleBlendedTextureShader. As above, but it takes two images, and blends between them over time. This is used for things like mouse over effects on buttons.

The remaining two shaders are TextureShader and BlendedTextureShader. These are very much like the corresponding Simple versions, except they don't take a parameter for alpha blending (they're never alpha blended), and the image is drawn in a different way.

The file names passed to these two shaders should follow a naming convention, named something along the lines of foo_w4_h8.png. This indicates that the image as a 4px horizontal border, and an 8px vertical border: the border areas of the image won't be drawn stretched, just the centre portion.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Greetings, and a couple of questions

Postby rulfzid on Wed Sep 09, 2009 4:13 am

jps wrote:Hi rulfzid, and a belated welcome to the forums!

There's no way currently to place the minimap on the right hand side of the screen, but I added an item for it to my todo list.

I'm not happy with the current theme file format, it's not particularily flexible, and in need of replacement - but for what it's worth, a bit of documentation:

Each of the shader definitions specify a way to draw a rectangular area on screen. There are a few different types of shaders:
- ColorShader. This takes a single parameter, which is the color to draw.
- SimpleTextureShader. This takes the name of an image file, and a bool indicating if it should be alpha-blended over the background, or simply overwrite the background.
- SimpleBlendedTextureShader. As above, but it takes two images, and blends between them over time. This is used for things like mouse over effects on buttons.

The remaining two shaders are TextureShader and BlendedTextureShader. These are very much like the corresponding Simple versions, except they don't take a parameter for alpha blending (they're never alpha blended), and the image is drawn in a different way.

The file names passed to these two shaders should follow a naming convention, named something along the lines of foo_w4_h8.png. This indicates that the image as a 4px horizontal border, and an 8px vertical border: the border areas of the image won't be drawn stretched, just the centre portion.


Thanks for the info. I had figured out some of the above through some trial and error, but wasn't completely sure about the file naming. One more question: are the elements listed in default.sublime-theme all the possible elements that can be styled?

I was thinking about maybe writing a tutorial to lay out what I'd learned, but perhaps I should wait for the updates to the theme file format?

Also, just wanted to say thanks again - It's been said before, but it's just a lot of fun to work in Sublime.
rulfzid
 
Posts: 9
Joined: Thu Aug 20, 2009 10:06 pm

Re: Greetings, and a couple of questions

Postby jps on Wed Sep 09, 2009 5:31 am

rulfzid wrote:Thanks for the info. I had figured out some of the above through some trial and error, but wasn't completely sure about the file naming. One more question: are the elements listed in default.sublime-theme all the possible elements that can be styled?


Yep, what's in there is a complete list.

It's worth noting that there is an non-obvious limitation in the font rendering: the font used on tabs, the status panel, etc, is always rendered against a fixed background colour (specified by font.backgroundColor), rather than what it's actually drawn against. This means you can't have a dark coloured button that goes to being a light coloured one when the mouse is hovering over it, for instance. You can get a visual explanation of this by setting the backgroundColor to blue in the default theme.

rulfzid wrote:Also, just wanted to say thanks again - It's been said before, but it's just a lot of fun to work in Sublime.


Good to hear you like it!
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm


Return to General Discussion

Who is online

Users browsing this forum: BestGreek, karisublime and 14 guests