summaryrefslogtreecommitdiffstats
path: root/web-gui
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2010-06-03 15:22:25 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2010-06-03 15:22:25 +0200
commita28f25b2ef74d988f58c66dab3291bdb539ef106 (patch)
tree2e7641f276224c52a37f7c32ae589c887f7e1ab5 /web-gui
parent949d1db7a76b72dfebfd4380072473d10078f057 (diff)
downloadjson-dbus-bridge-examples-a28f25b2ef74d988f58c66dab3291bdb539ef106.tar.gz
[web-gui] make it nicer
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'web-gui')
-rw-r--r--web-gui/calculator/source/class/calculator/Application.js9
-rw-r--r--web-gui/calculator/source/class/calculator/theme/Appearance.js10
-rw-r--r--web-gui/calculator/source/resource/calculator/back.pngbin0 -> 98107 bytes
-rw-r--r--web-gui/calculator/source/resource/calculator/test.pngbin2478 -> 0 bytes
-rw-r--r--web-gui/hello-world/source/class/hello_world/Application.js30
-rw-r--r--web-gui/hello-world/source/class/hello_world/theme/Font.js12
-rw-r--r--web-gui/hello-world/source/resource/hello-world/test.pngbin2478 -> 0 bytes
-rw-r--r--web-gui/hello-world/source/resource/hello_world/back.pngbin0 -> 98107 bytes
8 files changed, 49 insertions, 12 deletions
diff --git a/web-gui/calculator/source/class/calculator/Application.js b/web-gui/calculator/source/class/calculator/Application.js
index c6e8c85..3041bea 100644
--- a/web-gui/calculator/source/class/calculator/Application.js
+++ b/web-gui/calculator/source/class/calculator/Application.js
@@ -66,10 +66,15 @@ qx.Class.define("calculator.Application",
// Document is the application root
var doc = this.getRoot();
+ doc.setBackgroundColor("#ffffff");
+
+ var back = new qx.ui.basic.Image("calculator/back.png");
+ back.setScale(true);
+ doc.add(back, {left:0, top: 0});
var win = new qx.ui.window.Window("Calculator");
this.__win = win;
- doc.add(win, {left: 100, top: 50});
+ doc.add(win, {left: 50, top: 50});
var winLayout = new qx.ui.layout.Grid();
winLayout.setSpacing(10);
@@ -78,7 +83,9 @@ qx.Class.define("calculator.Application",
win.open();
this.__edit = new qx.ui.form.TextField();
+ this.__edit.setAppearance("calc-edit");
win.add(this.__edit, {row: 0, column: 0, colSpan: 5 });
+ this.__edit.setReadOnly(true);
var app = this;
var makeButton = function(text, r, c)
diff --git a/web-gui/calculator/source/class/calculator/theme/Appearance.js b/web-gui/calculator/source/class/calculator/theme/Appearance.js
index 3571fe9..1f5758c 100644
--- a/web-gui/calculator/source/class/calculator/theme/Appearance.js
+++ b/web-gui/calculator/source/class/calculator/theme/Appearance.js
@@ -22,6 +22,16 @@ qx.Theme.define("calculator.theme.Appearance",
font: "large"
};
}
+ },
+ "calc-edit": {
+ include: "textfield",
+ alias: "textfield",
+ style: function(states) {
+ return {
+ font: "large",
+ textAlign: "right"
+ };
+ }
}
}
});
diff --git a/web-gui/calculator/source/resource/calculator/back.png b/web-gui/calculator/source/resource/calculator/back.png
new file mode 100644
index 0000000..fd06541
--- /dev/null
+++ b/web-gui/calculator/source/resource/calculator/back.png
Binary files differ
diff --git a/web-gui/calculator/source/resource/calculator/test.png b/web-gui/calculator/source/resource/calculator/test.png
deleted file mode 100644
index ef360cd..0000000
--- a/web-gui/calculator/source/resource/calculator/test.png
+++ /dev/null
Binary files differ
diff --git a/web-gui/hello-world/source/class/hello_world/Application.js b/web-gui/hello-world/source/class/hello_world/Application.js
index 1a7e450..72240c7 100644
--- a/web-gui/hello-world/source/class/hello_world/Application.js
+++ b/web-gui/hello-world/source/class/hello_world/Application.js
@@ -59,27 +59,37 @@ qx.Class.define("hello_world.Application",
// Document is the application root
var doc = this.getRoot();
+ doc.setBackgroundColor("#ffffff");
+
+ var back = new qx.ui.basic.Image("hello_world/back.png");
+ back.setScale(true);
+ doc.add(back, {left:0, top: 0});
+
var core = new qx.ui.container.Composite(new qx.ui.layout.Grid());
- doc.add(core, {left: 50, top: 50});
+ doc.add(core, {left: 120, top: 100});
core.getLayout().setSpacing(10);
core.getLayout().setColumnAlign(0, "left", "middle");
- core.add( new qx.ui.basic.Label("RPC Hello World:"), {row: 0, column: 0});
+ core.add( new qx.ui.basic.Label("RPC Hello World:"), {row: 0, column: 0, colSpan: 3});
var helloLabel = new qx.ui.basic.Label("<waiting for hello>");
- core.add(helloLabel, {row: 0, column: 1});
+ core.add(helloLabel, {row: 1, column: 0, colSpan: 3});
+
+ core.add(new qx.ui.core.Spacer(0, 55), {row: 2, column: 0});
- core.add( new qx.ui.basic.Label("Send Text:"), {row: 1, column: 0});
+ core.add( new qx.ui.basic.Label("RPC Echo:"), {row: 3, column: 0, colSpan: 3});
+ core.add( new qx.ui.basic.Label("Send:"), {row: 4, column: 0});
var echoEdit = new qx.ui.form.TextField();
- echoEdit.setWidth(200);
- core.add(echoEdit, {row: 1, column: 1});
+ echoEdit.setWidth(140);
+ core.add(echoEdit, {row: 4, column: 1});
+ echoEdit.focus();
- var echoButton = new qx.ui.form.Button("Echo");
- core.add(echoButton, {row: 1, column: 2});
+ var echoButton = new qx.ui.form.Button("Go");
+ core.add(echoButton, {row: 4, column: 2});
- core.add( new qx.ui.basic.Label("RPC Echo Receive:"), {row: 2, column: 0});
+ core.add( new qx.ui.basic.Label("Receive:"), {row: 5, column: 0});
var echoLabel = new qx.ui.basic.Label("<waiting for echo>");
- core.add(echoLabel, {row: 2, column: 1});
+ core.add(echoLabel, {row: 5, column: 1, colSpan: 2});
var rpc = new qx.io.remote.Rpc("http://localhost:8080/rpc", "com.pengutronix.jdb.Hello|/");
diff --git a/web-gui/hello-world/source/class/hello_world/theme/Font.js b/web-gui/hello-world/source/class/hello_world/theme/Font.js
index 957646d..a73b328 100644
--- a/web-gui/hello-world/source/class/hello_world/theme/Font.js
+++ b/web-gui/hello-world/source/class/hello_world/theme/Font.js
@@ -14,5 +14,15 @@ qx.Theme.define("hello_world.theme.Font",
fonts :
{
+ "default" :
+ {
+ size : (qx.bom.client.System.WINVISTA || qx.bom.client.System.WIN7) ? 17 : 15,
+ lineHeight : 1.4,
+ family : qx.bom.client.Platform.MAC ? [ "Lucida Grande" ] :
+ (qx.bom.client.System.WINVISTA || qx.bom.client.System.WIN7) ?
+ [ "Segoe UI", "Candara" ] :
+ [ "Tahoma", "Liberation Sans", "Arial", "sans-serif" ],
+ bold : true
+ }
}
-}); \ No newline at end of file
+});
diff --git a/web-gui/hello-world/source/resource/hello-world/test.png b/web-gui/hello-world/source/resource/hello-world/test.png
deleted file mode 100644
index ef360cd..0000000
--- a/web-gui/hello-world/source/resource/hello-world/test.png
+++ /dev/null
Binary files differ
diff --git a/web-gui/hello-world/source/resource/hello_world/back.png b/web-gui/hello-world/source/resource/hello_world/back.png
new file mode 100644
index 0000000..fd06541
--- /dev/null
+++ b/web-gui/hello-world/source/resource/hello_world/back.png
Binary files differ