Skip to content
المشاريع

kenmoore/sketch-relabel-button

عرض على GitHub

حول

إضافة لـ Sketch.app لتغيير تسمية زر (أو مجموعة طبقات مجمعة مشابهة) وضبط حجمه تلقائيًا

مشاريع أخرى

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
٠
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

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

Have a look...

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

  1. Choose "Reveal Plugins Folder..." from Sketch's Plugins menu.
  2. Open the file "Relabel Button.sketchplugin" in a text editor.
  3. 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.

Twitter

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…