Sublime Forum

Can we change font size for tabs in ST4?

#1

For me, the font size on the tabs is difficult to read.
I did some Forum searching and found comments for ST3, including the disturbing comment

The tabs “label” font.size does not work properly, it’s a [well known bug in Sublime Community

but nothing for ST4.
In fact I did find the ‘tab_label: font.size’ command in Settings | Customize Theme and tried increasing it. And sure enough, it didn’t work.
Is this still an ongoing bug for ST4? Is there no way to adjust this?
I’m running version 4200.

0 Likes

#2

Any label’s text size can be changed via theme.

	{
		"class": "tab_label",
		"font.face": "var(tab_font_face)",
		"font.size": 19, //  "var(tab_font_size)",
		"font.bold": false,
	},

Note however, changing font.size, only, may not be sufficient or may cause UI to look broken, as parent controls (the tab_control in this case) also needs to be adjusted in size.

Whether a simple rule, like illustraded above, applies, depends on whether your active theme specifies more specific selectors - those may take precedence. Order of rules is of relevance as well.

You may probably want to check out "ui_scale" preference, which scales whole UI with given factor, including labels and their parent UI controls - especially if it is not only a single control the text of which is too small.

1 Like

#3

Thanks, deathaxe,

But while I get your basic point, that I may have to edit the parent controls as well, the details are still not clear to me.

I now have this in Customize Theme (Cobalt2.sublime-theme)
{
“class”: “tab_label”,
“font.face”: “var(tab_font_face)”,
“font.size”: 19,
“font.bold”: false
},
{
“class”: “tab_label”,
“parents”: [
{
“class”: “tab_control”,
“font.size”: 19
}]
}

The default Cobalt2 theme has tab_label font size 11. The edits I’ve added in Customize show no apparent change.

Whether a simple rule, like illustraded above, applies, depends on whether your active theme specifies more specific selectors - those may take precedence.

Okay. The only other place font.size appears in Cobalt2 is for the sidebar, and the default shows 11 for “settings”: [“sidebar_font_small”] and 15 for “settings”: [“sidebar_font_bigl”]. I don’t see a “settings”: [“tab_label_font_small”], so I expect it doesn’t exist.

Or are you suggesting I need to change the active theme?

The salient point here is that I haven’t been able to increase the font size in the tabs. Can you suggest another approach?

0 Likes

#4

The following simple customization works fine on my end:

// Documentation at https://www.sublimetext.com/docs/themes.html
{
	"variables":
	{
	},
	"rules":
	[
		{
		    "class": "tab_label",
		    "font.size": 19,
		},
	]
}
0 Likes

#5

Woof! Works great. Many thanks.

Mark

0 Likes