Skip to content

Commit

Permalink
Merge pull request #68 from evolus/development
Browse files Browse the repository at this point in the history
RC 1
  • Loading branch information
mbrainiac authored Jul 24, 2016
2 parents c7e14b5 + 3446494 commit 536280b
Show file tree
Hide file tree
Showing 469 changed files with 16,183 additions and 9,167 deletions.
1 change: 1 addition & 0 deletions app/app.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<script type="text/javascript" src="pencil-core/document/xmlDocumentPersister.js"></script>
<script type="text/javascript" src="pencil-core/document/persistentHooks.js"></script>

<script type="text/javascript" src="pencil-core/behavior/SVGTextLayout.js"></script>
<script type="text/javascript" src="pencil-core/behavior/commonBehaviors.js"></script>
<script type="text/javascript" src="pencil-core/behavior/commonFunctions.js"></script>

Expand Down
18 changes: 17 additions & 1 deletion app/css/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ body {
right: 0px;
top: 46%;
text-align: center;
opacity: 0;
animation: pulsate 1s ease-out;
animation-iteration-count: infinite;
}

body[loaded] #appView {
Expand All @@ -28,10 +31,23 @@ body[loaded] #bootingIndicator {
}

@keyframes loading {
from {left: -200px; width: 30%;}
from {left: -100px; width: 30%;}
50% {width: 30%;}
70% {width: 70%;}
80% { left: 50%;}
95% {left: 120%;}
to {left: 100%;}
}
@keyframes pulsate {
0% {
transform: scale(.7);
opacity: 0.0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1.1);
opacity: 0;
}
}
57 changes: 35 additions & 22 deletions app/css/pencil.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import "bootstrap-fix.less";
@import "../lib/font-awesome-4.4.0/less/font-awesome.less";
*/
@import "../lib/mdi/css/materialdesignicons.min.css";
.hbox {
flex-direction: row;
display: flex;
Expand Down Expand Up @@ -150,7 +151,6 @@ body {
right: 0px;
top: 46%;
text-align: center;

opacity: 0;
animation: pulsate 1s ease-out;
animation-iteration-count: infinite;
Expand All @@ -161,6 +161,40 @@ body[loaded] #appView {
body[loaded] #bootingIndicator {
display: none;
}
@keyframes loading {
from {
left: -100px;
width: 30%;
}
50% {
width: 30%;
}
70% {
width: 70%;
}
80% {
left: 50%;
}
95% {
left: 120%;
}
to {
left: 100%;
}
}
@keyframes pulsate {
0% {
transform: scale(0.7);
opacity: 0.0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1.1);
opacity: 0;
}
}
html {
user-select: none;
-o-user-select: none;
Expand All @@ -186,24 +220,3 @@ icon {
-webkit-font-smoothing: antialiased;
opacity: 0.54;
}
@keyframes loading {
from {left: -100px; width: 30%;}
50% {width: 30%;}
70% {width: 70%;}
80% { left: 50%;}
95% {left: 120%;}
to {left: 100%;}
}
@keyframes pulsate {
0% {
transform: scale(.7);
opacity: 0.0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1.1);
opacity: 0;
}
}
1 change: 1 addition & 0 deletions app/css/pencil.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import "bootstrap-fix.less";
@import "../lib/font-awesome-4.4.0/less/font-awesome.less";
*/
@import "../lib/mdi/css/materialdesignicons.min.css";

@import "variables.less";
@import "layout.less";
Expand Down
3 changes: 3 additions & 0 deletions app/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ input[type="number"] {
border: 1px solid #CCC;
border-radius: 4px;
}
input[type=number]::-webkit-inner-spin-button {
height: 2.4em;
}
textarea {
font: inherit;
font-size: 1em;
Expand Down
38 changes: 22 additions & 16 deletions app/desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ module.exports = function () {
"gnome": [{command: "gsettings", params: ["get", "org.gnome.desktop.interface", "font-name"]}],
"ubuntu": [{command: "gsettings", params: ["get", "org.gnome.desktop.interface", "font-name"]}]
}

var defaultFamily = "Sans";
var defaultWeight = 400;
var defaultStyle = "normal";
var defaultSize = "10pt";

var fontNameReader = function(registry, callback, index) {
var child = spawn(registry.command, registry.params);
var tmp = "";
Expand All @@ -24,10 +30,10 @@ module.exports = function () {
if (fontName) {
fontName = fontName.trim();
}
var family = "sans-serif";
var weight = 400;
var style = "normal";
var size = "1em";
var family = defaultFamily;
var weight = defaultWeight;
var style = defaultStyle;
var size = defaultSize;

if (fontName.match(/^'(.+)'$/)) fontName = RegExp.$1;

Expand Down Expand Up @@ -70,21 +76,21 @@ module.exports = function () {
if (!fontRegistry) {
console.error("Coud not found font command registry for ", d);
callback({
family: "sans-serif",
weight: 400,
style: "normal",
size: "1em"
family: defaultFamily,
weight: defaultWeight,
style: defaultStyle,
size: defaultSize
});
} else {
var fontNames = [];
var processFontName = function(finish) {

if (finish && fontNames.length == 0) {
callback({
family: family,
weight: weight,
style: style,
size: size
family: defaultFamily,
weight: defaultWeight,
style: defaultStyle,
size: defaultSize
});
return;
}
Expand Down Expand Up @@ -168,10 +174,10 @@ module.exports = function () {
var handler = platformHandlers[platform];
if (!handler) {
callback({
family: "sans-serif",
weight: "400",
style: "normal",
size: "12pt"
family: defaultFamily,
weight: defaultWeight,
style: defaultStyle,
size: defaultSize
});
return;
}
Expand Down
5 changes: 5 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ function createWindow() {
app.exit(0);
});

if (process.platform == 'darwin') {
var {MacOSToolbar} = require('./views/toolbars/MacOSToolbar');
MacOSToolbar.createMacOSToolbar();
}

mainWindow.webContents.on("will-navigate", handleRedirect);
mainWindow.webContents.on("new-window", handleRedirect);

Expand Down
2 changes: 2 additions & 0 deletions app/lib/mdi/css/materialdesignicons.min.css

Large diffs are not rendered by default.

Binary file not shown.
9 changes: 9 additions & 0 deletions app/lib/widget/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ function __isSubClassOf(sub, base) {
if (!sub.__base) return false;
return sub.__base === base || __isSubClassOf(sub.__base, base);
}
function __isAssignableFrom(sub, base) {
return sub === base || __isSubClassOf(sub, base);
}


var less = require("less");

Expand Down Expand Up @@ -645,6 +649,7 @@ function BaseWidget(definitionNode) {
Dom.addClass(node, "widget_" + this.constructor.name);
this.__node = node;
node.__widget = this;
node["__is_" + this.constructor.name] = true;

var thiz = this;
node.addEventListener("DOMNodeInsertedIntoDocument", function () {
Expand Down Expand Up @@ -759,6 +764,10 @@ BaseWidget.handleClosableEscapeKey = function (event) {
Dom.cancelEvent(event);
}
};
BaseWidget.getTopClosable = function (event) {
if (BaseWidget.closables.length == 0) return null;
return BaseWidget.closables[BaseWidget.closables.length - 1];
};
BaseWidget.handleGlobalMouseDown = function (event) {
if (BaseWidget.closables.length == 0) return;
var closable = BaseWidget.closables[BaseWidget.closables.length - 1];
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Pencil",
"productName": "Pencil",
"description": "An open-source GUI prototyping tool that is available for ALL platforms.",
"version": "3.0.0-beta.2",
"version": "3.0.0-rc.1",
"author": {
"name": "Evolus",
"url": "http://evolus.vn",
Expand Down
Loading

0 comments on commit 536280b

Please sign in to comment.