项目
在 GitHub 查看
kenmoore/sketch-relabel-button
关于
Sketch.app 插件,可为按钮(或类似的图层组)重新命名并自动调整尺寸
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Relabel Button plugin for Sketch
The Relabel Button plug-in for Sketch.app prompts for a button's new label then applies the text, resizes the button background and repositions any other interior elements while maintaining the existing padding.
Demo
Usage
- Select any group or symbol that contains a text layer and one or more other layers (dividers, icons, drop-arrows, etc)
- Press Cmd+J and enter the new text for the button (or Cmd+Ctrl+J for right aligned resize)
That's it! The text and other objects will be updated maintaining the button's original padding and relative layout.
Guidelines
- nested groups not supported
- for symbols, elements SHOULD NOT be placed within a group
- for symbols, child elements should have Resizing set to Pin To Corner so they do not get shrunk/stretched
- see the Relabel Button Guidelines Sketch file for example buttons
Changing the Default Keyboard Shortcut
- Choose "Reveal Plugins Folder..." from Sketch's Plugins menu.
- Open the file "Relabel Button.sketchplugin" in a text editor.
- Edit the shortcut specifications in
manifest.json:
"shortcut" : "command j",
Credits
Many thanks to Alexander Kudymov, who wrote the Dynamic Button plugin which I modified.
Also thanks to @fuggfuggfugg, who graciously shared useful code for manipulating symbols.
探索相关项目
加载中…
