[pkg-fso-commits] [SCM] freesmartphone.org demo GUI branch, master, updated. milestone3-4-g71fc58f
Joachim Breitner
mail at joachim-breitner.de
Fri Sep 12 15:43:20 UTC 2008
The following commit has been merged in the master branch:
commit 968e82c54e9a68c0cd5210d2b2a6f69e7bb7a3b4
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Fri Sep 12 16:48:14 2008 +0200
UI for suspend progress
This might be improved by someone who has a hand for that, as it’s not
as slick as it could be.
diff --git a/data/themes/zhone.edc b/data/themes/zhone.edc
index e63f4e2..2799a5f 100644
--- a/data/themes/zhone.edc
+++ b/data/themes/zhone.edc
@@ -969,6 +969,21 @@ collections {
}
}
}
+ part {
+ name: "suspend";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ relative: 0.0 HEADER_HEIGHT;
+ offset: 0 0;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: -1 -1;
+ }
+ }
+ }
}
}
group {
@@ -1164,4 +1179,8 @@ collections {
name: "text_show";
#include "zhone_text_show.edc"
}
+ group {
+ name: "suspend";
+ #include "zhone_suspend.edc"
+ }
}
diff --git a/data/themes/zhone_suspend.edc b/data/themes/zhone_suspend.edc
new file mode 100644
index 0000000..7fafc3e
--- /dev/null
+++ b/data/themes/zhone_suspend.edc
@@ -0,0 +1,100 @@
+parts {
+ SWALLOWCLIP();
+
+ part {
+ name: "suspend_background";
+ type: RECT;
+ repeat_events: 0;
+ clip_to: "swallow_clip";
+ description {
+ state: "default" 0.0;
+ rel1 {
+ relative: 0.0 0.0;
+ offset: 0 0;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: -1 -1;
+ }
+ color: 0 0 0 192;
+ }
+ }
+
+ #define SUSPEND_STAGE(part_name, ypos, ycount, label) \
+ part { \
+ name: "box_"part_name; \
+ type: RECT; \
+ mouse_events: 0; \
+ clip_to: "swallow_clip"; \
+ description { \
+ state: "default" 0.0; \
+ visible: 1; \
+ rel1 { \
+ relative: 1/8 (1/ycount*ypos + 1/(8*ycount)); \
+ offset: 0 0; \
+ to: "suspend_background"; \
+ } \
+ rel2 { \
+ relative: 7/8 \
+ (7/(8*ycount)+(1/ycount*ypos)); \
+ offset: -1 -1; \
+ to: "suspend_background"; \
+ } \
+ } \
+ description { \
+ state: "default" 0.0; \
+ color: 64 64 64 255; \
+ } \
+ description { \
+ state: "highlighted" 0.0; \
+ inherit: "default" 0.0; \
+ color: 64 255 64 255; \
+ } \
+ } \
+ part { \
+ name: "label_"part_name; \
+ type: TEXT; \
+ effect: SOFT_OUTLINE; \
+ mouse_events: 0; \
+ clip_to: "swallow_clip"; \
+ description { \
+ state: "default" 0.0; \
+ align: 0.5 0.5; \
+ rel1 { \
+ relative: 0.1 0.3; \
+ offset: 0 0; \
+ to: "box_"part_name; \
+ } \
+ rel2 { \
+ relative: 0.9 0.7; \
+ offset: -1 -1; \
+ to: "box_"part_name; \
+ } \
+ text { \
+ font: "Sans"; \
+ text: label; \
+ size: 1; \
+ fit: 1 1; \
+ } \
+ } \
+ } \
+ program { \
+ name: "highlight_"part_name; \
+ signal: "highlight_"part_name; \
+ action: STATE_SET "highlighted" 0.0; \
+ target: "box_"part_name; \
+ } \
+ program { \
+ name: "unhighlight_"part_name; \
+ signal: "unhighlight_"part_name; \
+ action: STATE_SET "default" 0.0; \
+ target: "box_"part_name; \
+ } \
+
+ SUSPEND_STAGE("0", 0, 4, "keep pressed")
+ SUSPEND_STAGE("1", 1, 4, "let go")
+ SUSPEND_STAGE("2", 2, 4, "suspending")
+ SUSPEND_STAGE("3", 3, 4, "waking up")
+
+ TRANSITION();
+}
--
freesmartphone.org demo GUI
More information about the pkg-fso-commits
mailing list