Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ Set the background image to file specified by `path`.

Set the background color to the color specified by three floats between 0 and 1.

### file.setTextSize(size)

Set the size of all texts below all icons to `size`.

### file.setIconSize(size)

Set the size of all icons in the folder to `size`.
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Helper.prototype.setBackgroundColor = function (red, green, blue) {
this.opts.backgroundColor = [red, green, blue]
}

Helper.prototype.setTextSize = function (size) {
this.opts.textSize = size
}

Helper.prototype.setIconSize = function (size) {
this.opts.iconSize = size
}
Expand Down Expand Up @@ -55,7 +59,7 @@ Helper.prototype.write = function (path, cb) {
}

this.file.push(Entry.construct('.', 'bwsp', this.opts.window))
this.file.push(Entry.construct('.', 'icvp', { iconSize: this.opts.iconSize, rawAlias: rawAlias, colorComponents: colorComponents }))
this.file.push(Entry.construct('.', 'icvp', { textSize: this.opts.textSize, iconSize: this.opts.iconSize, rawAlias: rawAlias, colorComponents: colorComponents }))

this.file.write(path, cb)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Entry.construct = function (filename, structureId, opts) {
backgroundColorBlue: new bplist.Real(1),
showIconPreview: true,
showItemInfo: false,
textSize: new bplist.Real(12),
textSize: new bplist.Real(opt('textSize')),
iconSize: new bplist.Real(opt('iconSize')),
viewOptionsVersion: 1,
gridSpacing: new bplist.Real(100),
Expand Down