A Sketch plugin that adjusts the size of a shape layer according to the width and height of a text layer, plus values that you can input for padding.
Select layers and add padding
Use text alignment to control re-drawing
Download the zip archive, unpack and open the Adjust Button Shape.sketchplugin
.
Select one shape layer and one text layer and run the script, either via Plugins > Adjust Button Shape
or with the keyboard shortcut Shift + Ctrl + Cmd + Opt + B
.
Insert values for the top, right, bottom or left padding of the shape. If you want an already nice looking padding to stay unaltered, leave the input field blank.
Use text alignment — left, right and center — to control how the button is positioned when re-drawn
2016-05-09 Added text alignment sensitivity when re-drawing the position of the shape layer
File an issue or contact me on Twitter: http://twitter.com/psilfver