How to reduce size of customized scroll bar in Sublime Text 3 - material-design

I have customized my scroll bar by referencing one answer from stackoverflow.
This is my Material-Theme-Darker.sublime-theme file
[
// More visible scrollbar
{
"class": "puck_control",
"layer0.texture": "User/theme_override/scroll_puck.png",
// Optional: set to your desired RGB color
"layer0.tint": [141, 234, 255],
"layer0.opacity": 1.0,
"layer1.opacity": 0.0,
"layer0.inner_margin": 2,
},
{
"class": "puck_control",
"attributes": ["horizontal"],
"layer0.texture": "User/theme_override/scroll_puck_horiz.png",
}
]
But the scroll bar is quite bold and I want it to be short in width so can anyone tell me how can I achieve it?

In order to make the scrollbar narrower, you need to edit User/theme_override/scroll_puck.png and scroll_puck_horiz.png so that it is narrower. Then, set "content_margin" to something like this:
"content_margin": [8, 12],
and play around with the first number until you get a width you like.

Related

am5charts pie of pie change the legend color text to red

How can I change the font color of the text below? my background is dark.
my jsfiddle: https://jsfiddle.net/theg99/2vsnmb16/1/
I did mange to change the colors of the lines with:
var line0 = container.children.push(
am5.Line.new(root, {
position: "absolute",
stroke: root.interfaceColors.get("text"),
strokeDasharray: [2, 2],
stroke: am5.color('#0xFFFFFF'), //<--I added this, but whats for text?
})
);
It looks like this should work:
subSeries.labels.template.set("fill", am5.color(0xff0000));
This changes all the labels on your second chart - is that what you're looking for?

(fabric.js) Can I change a position of a character in iText for vertical writing?

I am Japanese, and I want to write Japanese words vertically in Fabric.js.
Japanese language has small letters, and the positions of the them are top-left corner in vertical writing.
So, I want to change the position of a small letter in iText.
I thought that I can change the position of a character by using "styles" parameter of iText, so I wrote as follows.
var iTextSample = new fabric.IText('h\ne\nl\nl\no', {
left: 50,
top: 50,
fontFamily: 'Helvetica',
fill: '#333',
lineHeight: 1.1,
styles: {
1: {
0: { textDecoration: 'underline', ←★ WORK
fontSize: 80, ←★ WORK
top:-10,  ←★ NOT WORK
transformMatrix: [ 1, 0, 0, 1, 18, -50 ] ←★ NOT WORK
},
},
}
});
https://jsfiddle.net/uemon/tLy9eqj6/77/
The 'textDecoration' and 'fontSize' worked, but the 'top' or 'transformMatrix' didn't work.
Can't I use 'top' or 'transformMatrix' in the "styles" parameter ?
How can I change the position of one character ?
Thank you in advance.
So from the use of textDecoration property i guess you are on the 1.7 or similar version.
You should really move to the 2.0 version that has integrated support for multibyte languages and composition.
Said that, there is no support for vertical text in fabricjs at all.
This may change in the future.
You should really go here:
https://github.com/kangax/fabric.js/issues/511
refresh the request and maybe add some detail about it, because the actual mantainer may have no clue on how vertical text should work regarding input, decorations, multiple columns and so on.

Hot to set line height in Sublime Text tab set control

I want to change the font size for a larger, but I can't change the line height, so that letters like g p q are "under cropped"
I haven't found solutions, seems than nobody has changed the labels line height on "tab set control" ¿?
I tried
"row_padding": [8, 3], // increase second value e.g. [8, 6]
"indent": 12,
and
"line_padding_bottom": 3,
"line_padding_top": 3
without success
Thanks
This is a known bug, with currently no workarounds (as at build 3126): https://github.com/SublimeTextIssues/Core/issues/694
EDIT: this has been fixed in build 3127.

raphael - SVG should be hidden when overflowing background SVG

http://codepen.io/keyboardninja/pen/WQwoRg
var content = paper.text (70, 54, "3").attr({
"font-size": "120px",
"font-weight": "600",
'fill': 'red',
});
I want the content of the triangle not to be visible outside of the triangle. The black background is the only place where the content should be visible on, not outside of that. is there a way to make something like to hide content that overflows the shape of the black triangle background ?

Show or hide components using Manipulate in Mathematica

How could I set a Controller to show or Hide a Graphic component of a Manipulate ?
Manipulate[Graphics[
{Pink, Disk[{1, 1}, r],
Green, Disk[{2, 2}, r]}],
{{r, 0.5, Style["Radius", Black, 16]}, 0.5, 5, 1,
Appearance -> "Labeled"}]
For example, in the above, How could I set a controller to Display or not the Green Circle ?
- Solution :
Manipulate[Graphics[{
If[thePink,
{Pink, Disk[{1, 1}, r]}],
If[theGreen,
{Green, Disk[{2, 2}, r]}]
}
],
{{r, 0.5, Style["Radius", Black, 16]}, 0.5, 5, 1,
Appearance -> "Labeled"},
{{thePink, True, "Pink"}, {True, False}},
{{theGreen, False, "Green"}, {True, False}}]
You can't really "hide" the green ball.
What is displayed is the result of the Manipulate expression evaluation. Manipulate works like this:
Manipulate[ expression, control_variables ]
When any control variable changes (dynamically), the expression is reevaluated and its results displayed. So, when you move the slider, you are changing a variable value, and hence the expression is being re-evaluated and its output displayed.
To "hide" anything, you then need to change the expression NOT to output the green ball. So, you need to add some control variable (say checkbox) and if set, then change the expression not to show the green ball. Simple logic test will do. For example
Manipulate[
Graphics[{Pink, Disk[{1, 1}, r], Green, If[show, Disk[{2, 2}, r]],
Sequence[]}], {{r, 0.5, "Radius"}, 0.5,
5}, {{show, True, "Show Green Circle?"}, {True, False}}]
EDIT:
WOw, thanks Simon, I was about to paste an example of doing just what you did when I saw your edit. thanks. It almost the same code as yours. Here it is might as well paste it :)
Manipulate[Graphics[
{ Pink,Disk[{1,1},r],
If[on,{Green,Disk[{2,2},r]}]
}] ,
{{r,0.5,"Radius"},0.5,5},
{{on,False,"show green ball"},{True,False}}
]
Perhaps:
Manipulate[
Graphics[{Pink, Disk[{1, 1}, r], Opacity[o],
Green, Disk[{2, 2}, r]}],
{{r, 0.5, "Radius"}, 0.5, 5},
{{o, 0.5, "Opacity"}, 0, 1}]

Resources