How to increase/decrease height of Sublime status bar? - user-interface

I was successful at modifying the sidebar_container and tabset_control of Material Theme except the status bar. It is a bit too big for me and I want to adjust the height of it like Piatto's (also the width/height of button if possible).
Material Theme: (modified, except status bar)
Piatto Dark Theme:
How do I set height/width of the status bar? (and also buttons on it, if possible)

You can try add the following code to your .sublime-theme file. Modify the values in the "content_margin" to adjust the height.
{
"class": "status_bar",
"content_margin": [0, 0, 0, 0]
},
{
"class": "status_button",
"content_margin": [0, 0, 0, 0],
"min_size": [75, 0]
}
Or add the following in the user setting:
"material_theme_small_statusbar": true

Related

Determining cumulative layout shift when attributed node is null

I am trying to reduce CLS (cumulative layout shift) on a website. Using the webvitals JS library from Google, I am seeing that one of the largest sources of CLS is the below, which has "null" for the node causing the layout shift. Anyone know how to address this? If the node causing the shift is null, how would I update the CSS or HTML to prevent this shift?
sources: Array(1)
0: LayoutShiftAttribution
currentRect: DOMRectReadOnly {x: 0, y: 0, width: 0, height: 0, top: 0, …}
node: null
previousRect: DOMRectReadOnly {x: 0, y: 0, width: 375, height: 329, top: 0, …}
__proto__: LayoutShiftAttribution
I'm looking into this myself currently, I use a lot of loading skeletons to inform users that content is loading, once content has been fetched, I think they become null, they're essentially DOM nodes that have been replaced in some way.

Sub 10 height request layouts/views not allowed

I'm trying to add line dividers between views. However, there is a forced margin on every element I try (Image, BoxView, Frame, Label). I set the margin to be 0, the HeightRequest is always 3, but as you can see the view bounds expand past the actual view. Is there a specific view I'm supposed to be using? I just want the gray line and nothing more.
var line2 = new Frame
{
WidthRequest = (App.ScreenDpWidth / 2),
MinimumHeightRequest = 3,
HeightRequest = 3,
BackgroundColor = Color.FromHex("#229EBB"),
Margin = new Thickness(0, 0)
};
I assume you are layouting your elements either in a Grid or a StackLayout.
By default, the StackLayout.Spacing, Grid.RowSpacing and Grid.ColumnSpacing properties are set to 6d.
Without more information, I think that's what you're seeing in your code. Change those values to 0d.
Also, if you only want a gray line, you can use a BoxView which will draw a gray box, and set it's Height to 1d.

What sets the left file pane margin for Sublime Text 3 UI themes?

I'm using the Soda Dark UI theme for Sublime Text 3 and I'd like to increae the left margin within the pane. It looks too tight, to me.
What class(s) is used to define that margin?
The class you are looking for is sidebar_container and the property is content_margin.
I see in your screenshot that you already know what file you need to look in, but maybe is usefulf for other users to know that you can create a file called Soda Dark 3.sublime-theme inside Packages/User for your overrides with the following content:
[
// Soda Dark 3 theme overrides
// Sidebar container
{
"class": "sidebar_container",
"content_margin": [10, 0, 1, 0]
}
]
The value of content_margin has the following syntax so in this case you need to change the first value for the left margin value you want:
[left, top, right, bottom]

Sublime text how to make tab labels display whole characters in a bigger font size

I set the font size of tab_labels bigger in default theme,so i edit the theme package like this
{
"class": "tab_label",
"fg": [0, 0, 0, 255],
"shadow_color": [255, 255, 255, 80],
"shadow_offset": [0, 1],
"font.italic": false,
"font.size": 17.0 <---what i insert
},
but unfortunately I can only see the half part of the characters in labels now(only upper part because font seems too big)
(so sorry I dont have enough rep to post image),how can I fix that problem.
Unfortunately this isn't possible as far as I know of.
You can set the tab_height to a larger value, but it still cuts off the text:
http://wes.io/Qzm0/content
There is a thread about this on the sublime forum:
http://www.sublimetext.com/forum/viewtopic.php?f=3&t=8889

Sublime Text 2 : colour of edited file tab?

I see that the Sublime Text theme (.config/sublime-text-2/Packages/Theme - Default/Default.sublime-theme) can be edited to make the open tab more obvious.
For that I use
{
"class": "tab_control", "attributes": ["selected", "file_medium_dark"],
"tint_modifier": [0, 255, 0, 32]
/* ... */
},
which makes the tab greener.
Is there a similar method for colouring the tab of an edited (unsaved) file/buffer?
Thanks.
After a little hunting around together with Mikko's suggestion of looking at the change log:
In Settings-User opened from Preferences | Settings add in the line
"highlight_modified_tabs": true,
This will make the tab text orange whenever there are unsaved changes to a file.
To change the color from orange, a bit of further digging around and experimentation was needed and revealed that editing the theme was one way to change the color from orange.
Theme files can be located in in the Color Scheme - Default folder accessed from the menu Preferences | Browse Packages... - you will have to make these changes for every theme that you'd like to change the text color for:
{
"class": "tab_control", "attributes": ["selected", "file_medium_dark"],
"tint_modifier": [0, 255, 0, 40],
"layer2.texture": "Theme - Default/medium_dark_selected_tab_bg.png",
"layer2.opacity": 0.7
},
{
"class": "tab_control", "attributes": ["dirty", "file_medium_dark"],
"tint_modifier": [255, 0, 0, 40],
"layer2.texture": "Theme - Default/medium_dark_selected_tab_bg.png",
"layer2.opacity": 0.7
},
{
"class": "tab_control", "attributes": ["selected", "dirty", "file_medium_dark"],
"tint_modifier": [255, 255, 0, 40],
"layer2.texture": "Theme - Default/medium_dark_selected_tab_bg.png",
"layer2.opacity": 0.7
},
It would be nice to be control the behavior of "selected" and "dirty" (=modified) separately. That might be possible with the layers, but I don't understand those well enough yet.
Addenda
(1) The above is for dark themes. For a light theme, omit the "file_medium_dark" from the attributes.
(2) The same changes apear to work in Sublime Text 3 (~/.config/sublime-text-3/Packages/Default.sublime-theme).
This is the best solution I have found:
https://coderwall.com/p/jg4kog
Inside of Sublime Text go to Preferences > Browse packages
Navigate to the User folder.
There you create a file called Default.sublime-theme
Open that file in Sublime Text and copy and paste the following JSON
object:
[{
"class": "tab_control",
"attributes": ["selected", "file_medium_dark"],
"tint_modifier": [255, 255, 255, 80]
}]
I had the same problem, and found what for me is a great solution. I replaced the graphics icons used on the tabs to make dirty tabs much more visible.
Replacing the dirty_circle, dirty_circle_light, and dirty_indicator graphics does the trick.
The details, along with some nice graphics, can be found here:
http://www.sublimetext.com/forum/viewtopic.php?f=3&t=5630

Resources