I am using the following code in a plugin, to pull my text "up" within its lines, so that it sits better alongside icons.
I found this snippet somewhere in a deep deep Google hole.
Without the code:
With the code:
See, it works to put the text better vertically aligned, but it has the negative effect that the text is too close to the top of the window.
I need to add some extra padding to the top of windows, so the lines sit better in the window.
Anyone know the code to do this?
I found this snippet somewhere in a deep deep Google hole.
Code:
alias_Bitmap_drawText = Bitmap.prototype.drawText;
Bitmap.prototype.drawText = function (text, x, y, maxWidth, lineHeight, align) {
y += -13;
alias_Bitmap_drawText.call(this, text, x, y, maxWidth, lineHeight, align);
};
Without the code:
With the code:
See, it works to put the text better vertically aligned, but it has the negative effect that the text is too close to the top of the window.
I need to add some extra padding to the top of windows, so the lines sit better in the window.
Anyone know the code to do this?