Open Kristinita opened 7 years ago
just stumbled upon this while googling around this problem. I guess it's still relevant to this date. Negative margins are a must for good theme UI aligning.
It appears your close button image has quite a lot of empty space surrounding.
content_margin
of tab_close_button
defines the canvas size the image is rendered in. The default of [8, 8]
means 16x16 logical pixels. You literly doubled the canvas size to 30x30 pixels while image source remains the same. Hence it and its "whitespace" are scaled, while image alignment keeps the same.
All items (text label and close button) are alligned to top left corner of a tab. The label and close button are not vertically centered.
Reducing tab_control
's top content_margin value would move both the label and close button upwards.
You could use a different image to increase the size of the close button without modifying the canvas size.
I wouldn't call this a bug, that's just the way the theme engine works. It assumes the close button to be nearly as large as the line height. Hence a canvas size of 16x16 pixels seems fine.
An improvement might be vertically center label and close button.
An alternative might be to add a setting to control text_label
position/margins.
Related forum post
1. Summary
Tab close button drops down if it size increase.
2. Settings
I use
SashaSublime.sublime-theme
.3. Expected behavior
If
4. Actual behavior
I reproduce the problem in a version of Sublime Text without plugins and user settings.
If
Tab close button drops down.
5. Environment
Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Sublime Text: Build 3126
Thanks.