mirror of
https://github.com/viliusle/miniPaint.git
synced 2026-02-06 11:21:47 +00:00
Landscape and Portrait layouts
This commit is contained in:
parent
0fa15bd180
commit
1c3568079d
@ -57,6 +57,7 @@ class File_new_class {
|
||||
{name: "width", title: "Width:", value: width, comment: units},
|
||||
{name: "height", title: "Height:", value: height, comment: units},
|
||||
{name: "resolution_type", title: "Resolution:", values: resolution_types},
|
||||
{name: "layout", title: "Layout:", value: "Custom", values: ["Custom", "Landscape", "Portrait"]},
|
||||
{name: "transparency", title: "Transparent:", value: transparency},
|
||||
],
|
||||
on_finish: function (params) {
|
||||
@ -79,6 +80,12 @@ class File_new_class {
|
||||
dim = dim[0].split("x");
|
||||
width = parseInt(dim[0]);
|
||||
height = parseInt(dim[1]);
|
||||
|
||||
if(response.layout == 'Portrait'){
|
||||
var tmp = width;
|
||||
width = height;
|
||||
height = tmp;
|
||||
}
|
||||
}
|
||||
else {
|
||||
//convert units
|
||||
|
||||
@ -37,6 +37,7 @@ class Image_size_class {
|
||||
{name: "w", title: "Width:", value: width, placeholder: width, comment: units},
|
||||
{name: "h", title: "Height:", value: height, placeholder: height, comment: units},
|
||||
{name: "resolution", title: "Resolution:", values: resolutions},
|
||||
{name: "layout", title: "Layout:", value: "Custom", values: ["Custom", "Landscape", "Portrait"]},
|
||||
],
|
||||
on_finish: function (params) {
|
||||
_this.size_handler(params);
|
||||
@ -76,6 +77,12 @@ class Image_size_class {
|
||||
dim = dim[0].split("x");
|
||||
width = parseInt(dim[0]);
|
||||
height = parseInt(dim[1]);
|
||||
|
||||
if(data.layout == 'Portrait'){
|
||||
var tmp = width;
|
||||
width = height;
|
||||
height = tmp;
|
||||
}
|
||||
}
|
||||
else{
|
||||
//convert units
|
||||
|
||||
Loading…
Reference in New Issue
Block a user