diff --git a/CHANGELOG.md b/CHANGELOG.md index e911faa..1c191f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,13 @@ +## [0.7.4] - 2016-11-21 + +* More lines for Commit: the first line is the commit message, all the others are an optional longer description + + ## [0.7.3] - 2016-10-03 * fix non-ascii characters encoding (thanks @tomonari-t) + ## [0.7.2] - 2016-09-08 * fix when the path to the plugin has multiple spaces diff --git a/Git.sketchplugin/Contents/Sketch/manifest.json b/Git.sketchplugin/Contents/Sketch/manifest.json index 8316813..f38d7d3 100644 --- a/Git.sketchplugin/Contents/Sketch/manifest.json +++ b/Git.sketchplugin/Contents/Sketch/manifest.json @@ -4,7 +4,7 @@ "author": "Mathieu Dutour", "authorEmail" : "mathieu@dutour.me", "homepage": "http://github.com/mathieudutour/git-sketch-plugin", - "version": "0.7.3", + "version": "0.7.4", "identifier": "me.dutour.mathieu.git-plugin", "compatibleVersion": 3, "bundleVersion": 2, diff --git a/Git.sketchplugin/Contents/Sketch/shared.cocoascript b/Git.sketchplugin/Contents/Sketch/shared.cocoascript index 523b5d5..2cea692 100755 --- a/Git.sketchplugin/Contents/Sketch/shared.cocoascript +++ b/Git.sketchplugin/Contents/Sketch/shared.cocoascript @@ -87,14 +87,13 @@ var shared = { }; }, createInputWithCheckbox: function(context, msg, checkboxMsg, checked, okLabel, cancelLabel) { - var accessory = NSView.alloc().initWithFrame(NSMakeRect(0,0,300,50)); - var input = NSTextField.alloc().initWithFrame(NSMakeRect(0,25,300,25)); - input.editable = true; + var accessory = NSView.alloc().initWithFrame(NSMakeRect(0,0,300,100)); + var input = TextArea(0,25,300,75); var checkbox = NSButton.alloc().initWithFrame(NSMakeRect(0,0,300,25)); checkbox.setButtonType(3); checkbox.title = checkboxMsg; checkbox.state = checked ? 1 : 0; - accessory.addSubview(input); + accessory.addSubview(input.view); accessory.addSubview(checkbox); var alert = NSAlert.alloc().init(); @@ -105,7 +104,7 @@ var shared = { alert.setAccessoryView(accessory); var responseCode = alert.runModal(); - var message = input.stringValue(); + var message = input.getValue(); return { responseCode: responseCode, @@ -206,3 +205,19 @@ var shared = { } } }; + +function TextArea(x, y, width, heigh) { + var scrollView = NSScrollView.alloc().initWithFrame(NSMakeRect(x, y, width, heigh)); + scrollView.borderStyle = NSLineBorder + var contentSize = scrollView.contentSize() + var input = NSTextView.alloc().initWithFrame(NSMakeRect(0, 0, contentSize.width, contentSize.height)); + input.minSize = NSMakeSize(0, contentSize.height) + input.maxSize = NSMakeSize(contentSize.width, Infinity) + scrollView.documentView = input + return { + view: scrollView, + getValue: function() { + return input.string() + } + } +} diff --git a/example/.exportedArtboards/example/Artboard 1@0.5x.png b/example/.exportedArtboards/example/Artboard 1@0.5x.png index 68ea4a2..b8b8441 100644 Binary files a/example/.exportedArtboards/example/Artboard 1@0.5x.png and b/example/.exportedArtboards/example/Artboard 1@0.5x.png differ diff --git a/example/example.sketch b/example/example.sketch index 6a55a6f..c8733ce 100644 Binary files a/example/example.sketch and b/example/example.sketch differ