Sublime Forum

Greetings, and a couple of questions

#1

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

0 Likes

#2

[quote=“rulfzid”]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[/quote]

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

0 Likes

#3

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.

0 Likes

#4

[quote=“jps”]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.[/quote]

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.

0 Likes

#5

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.

Good to hear you like it!

0 Likes