Skip to content

Commit

Permalink
Merge pull request #60 from mathieudutour/f/long-commit-message
Browse files Browse the repository at this point in the history
F/long commit message
  • Loading branch information
mathieudutour authored Nov 21, 2016
2 parents 911ca8e + 48402e8 commit fd67f42
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Git.sketchplugin/Contents/Sketch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "Mathieu Dutour",
"authorEmail" : "[email protected]",
"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,
Expand Down
25 changes: 20 additions & 5 deletions Git.sketchplugin/Contents/Sketch/shared.cocoascript
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -105,7 +104,7 @@ var shared = {
alert.setAccessoryView(accessory);

var responseCode = alert.runModal();
var message = input.stringValue();
var message = input.getValue();

return {
responseCode: responseCode,
Expand Down Expand Up @@ -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()
}
}
}
Binary file modified example/.exportedArtboards/example/Artboard [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/example.sketch
Binary file not shown.

0 comments on commit fd67f42

Please sign in to comment.