2009-12-20 18:55:31 -08:00
|
|
|
// LICENSE NOTE:
|
|
|
|
// This file (and only this one) is licenses under public-domain. The reason
|
|
|
|
// is that this is meant to serve as a template for making your own themes and
|
|
|
|
// Elementary's LGPL license is not intended to follow. The images used do come
|
|
|
|
// under LGPL, but this file specifically for the structure of your theme is
|
|
|
|
// public-domain. This means you can take, use, re-license and otherwise
|
|
|
|
// have zero restrictions on using this file as a base for your theme.
|
|
|
|
|
2010-10-12 15:28:47 -07:00
|
|
|
externals.external: "elm";
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
collections {
|
|
|
|
|
Begins highlight on focused object.
There's still work to do here, particularly in the theme, but it has
something nice and fun to see the code working.
The idea behind this:
Window tracks focused object and sends the highlight object(s) to it. These
are simple edje objects, one on top, one below the focused widget for nice
effects. Widgets can choose to ignore the highlight and this will be sent to
the parent object, if it doesn't ignore it as well.
About the bottom object, it doesn't work now. For the most part, focused
widget will always be a member of some smart object, so stacking won't work
and the desired effect is nowhere to be seen. This will be worked out later.
To be done now:
- Let the theme for a widget define its own highlight, disabling if needed
the standard one for those objects.
- Needed base in code to allow animations when switching focus. All in theme.
- Properly test all widgets and fix some things that will most likely work
in weird ways, given the nature of Evas/Edje and how Elementary makes use
of them.
- Forgot the rest, stay tuned, test, report, give ideas, plant a tree.
Work started by glima, continued with some refactors by me when he
decided he needed vacations.
SVN revision: 52524
2010-09-20 15:18:58 -07:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
group { name: "elm/focus_highlight/top/default";
|
|
|
|
images {
|
|
|
|
image: "emo-unhappy.png" COMP;
|
|
|
|
}
|
2010-09-28 09:54:11 -07:00
|
|
|
|
|
|
|
data {
|
|
|
|
item: "animate" "on";
|
|
|
|
}
|
|
|
|
|
|
|
|
script {
|
|
|
|
public s_x, s_y, s_w, s_h; /* source */
|
|
|
|
public difx, dify, difw, difh;
|
2010-10-04 05:48:15 -07:00
|
|
|
public rot_dir;
|
2010-09-28 09:54:11 -07:00
|
|
|
|
|
|
|
public animator1(val, Float:pos) {
|
2010-10-04 05:48:15 -07:00
|
|
|
new x, y, w, h, dx, dy, dw, dh, Float:rot;
|
2010-09-28 09:54:11 -07:00
|
|
|
|
|
|
|
dx = round(float_mul(float(get_int(difx)), pos));
|
|
|
|
x = get_int(s_x) + dx;
|
|
|
|
dy = round(float_mul(float(get_int(dify)), pos));
|
|
|
|
y = get_int(s_y) + dy;
|
|
|
|
dw = round(float_mul(float(get_int(difw)), pos));
|
|
|
|
w = get_int(s_w) + dw;
|
|
|
|
dy = round(float_mul(float(get_int(difh)), pos));
|
|
|
|
h = get_int(s_h) + dh;
|
|
|
|
|
|
|
|
update_offset(x, y, w, h);
|
|
|
|
|
2010-10-04 05:48:15 -07:00
|
|
|
rot = 360.0 * pos * float(get_int(rot_dir));
|
|
|
|
set_state_val(PART:"shine", STATE_MAP_ROT_Z, rot);
|
|
|
|
|
2010-09-28 09:54:11 -07:00
|
|
|
if (pos >= 1.0) {
|
|
|
|
emit("elm,action,focus,anim,end", "");
|
|
|
|
set_state(PART:"shine", "default", 0.0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public update_offset(x, y, w, h) {
|
|
|
|
new x1, y1, x2, y2;
|
|
|
|
x1 = x + w - 15;
|
|
|
|
y1 = y - 15;
|
|
|
|
x2 = x + w + 14;
|
|
|
|
y2 = y + 14;
|
|
|
|
set_state_val(PART:"shine", STATE_REL1_OFFSET, x1, y1);
|
|
|
|
set_state_val(PART:"shine", STATE_REL2_OFFSET, x2, y2);
|
|
|
|
}
|
|
|
|
|
|
|
|
public message(Msg_Type:type, id, ...) {
|
|
|
|
if ((type == MSG_INT_SET) && (id == 1)) {
|
|
|
|
new x1, y1, w1, h1;
|
|
|
|
new x2, y2, w2, h2;
|
2010-10-04 05:48:15 -07:00
|
|
|
new px1, px2, py1, py2;
|
|
|
|
new rd;
|
2010-09-28 09:54:11 -07:00
|
|
|
|
|
|
|
x1 = getarg(2);
|
|
|
|
y1 = getarg(3);
|
|
|
|
w1 = getarg(4);
|
|
|
|
h1 = getarg(5);
|
|
|
|
x2 = getarg(6);
|
|
|
|
y2 = getarg(7);
|
|
|
|
w2 = getarg(8);
|
|
|
|
h2 = getarg(9);
|
2010-10-04 05:48:15 -07:00
|
|
|
|
2010-09-28 09:54:11 -07:00
|
|
|
set_int(s_x, x1);
|
|
|
|
set_int(s_y, y1);
|
|
|
|
set_int(s_w, w1);
|
|
|
|
set_int(s_h, h1);
|
|
|
|
set_int(difx, x2 - x1);
|
|
|
|
set_int(dify, y2 - y1);
|
|
|
|
set_int(difw, w2 - w1);
|
|
|
|
set_int(difh, h2 - h1);
|
|
|
|
|
2010-10-04 05:48:15 -07:00
|
|
|
px1 = x1 + w1;
|
|
|
|
px2 = x2 + w2;
|
|
|
|
py1 = y1 + h1;
|
|
|
|
py2 = y2 + h2;
|
|
|
|
if (px2 > px1) {
|
|
|
|
rd = 1;
|
|
|
|
} else if (px1 > px2) {
|
|
|
|
rd = -1;
|
|
|
|
} else {
|
|
|
|
if (py2 > py1) {
|
|
|
|
rd = 1;
|
|
|
|
} else {
|
|
|
|
rd = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
set_int(rot_dir, rd);
|
|
|
|
|
2010-09-28 09:54:11 -07:00
|
|
|
custom_state(PART:"shine", "default", 0.0);
|
|
|
|
set_state_val(PART:"shine", STATE_REL1, 0.0, 0.0);
|
|
|
|
set_state_val(PART:"shine", STATE_REL2, 0.0, 0.0);
|
2010-10-04 05:48:15 -07:00
|
|
|
set_state_val(PART:"shine", STATE_MAP_ON, 1);
|
|
|
|
set_state_val(PART:"shine", STATE_MAP_ROT_Z, 0.0);
|
2010-09-28 09:54:11 -07:00
|
|
|
update_offset(x1, y1, w1, h1);
|
|
|
|
set_state(PART:"shine", "custom", 0.0);
|
|
|
|
|
|
|
|
anim(0.2, "animator1", 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Begins highlight on focused object.
There's still work to do here, particularly in the theme, but it has
something nice and fun to see the code working.
The idea behind this:
Window tracks focused object and sends the highlight object(s) to it. These
are simple edje objects, one on top, one below the focused widget for nice
effects. Widgets can choose to ignore the highlight and this will be sent to
the parent object, if it doesn't ignore it as well.
About the bottom object, it doesn't work now. For the most part, focused
widget will always be a member of some smart object, so stacking won't work
and the desired effect is nowhere to be seen. This will be worked out later.
To be done now:
- Let the theme for a widget define its own highlight, disabling if needed
the standard one for those objects.
- Needed base in code to allow animations when switching focus. All in theme.
- Properly test all widgets and fix some things that will most likely work
in weird ways, given the nature of Evas/Edje and how Elementary makes use
of them.
- Forgot the rest, stay tuned, test, report, give ideas, plant a tree.
Work started by glima, continued with some refactors by me when he
decided he needed vacations.
SVN revision: 52524
2010-09-20 15:18:58 -07:00
|
|
|
parts {
|
|
|
|
part { name: "base";
|
|
|
|
type: RECT;
|
|
|
|
repeat_events: 1;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.relative: 0.0 0.0;
|
|
|
|
rel2.relative: 1.0 1.0;
|
|
|
|
visible: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "shine";
|
|
|
|
type: IMAGE;
|
|
|
|
mouse_events: 1;
|
|
|
|
repeat_events: 1;
|
|
|
|
ignore_flags: ON_HOLD;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
image {
|
|
|
|
normal: "emo-unhappy.png";
|
|
|
|
}
|
|
|
|
rel1.to: "base";
|
|
|
|
rel1.relative: 1.0 0.0;
|
|
|
|
rel1.offset: -15 -15;
|
|
|
|
rel2.to: "base";
|
|
|
|
rel2.relative: 1.0 0.0;
|
|
|
|
rel2.offset: 14 14;
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 0 0 0 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
program { name: "show";
|
|
|
|
signal: "elm,action,focus,show";
|
|
|
|
source: "elm";
|
|
|
|
action: ACTION_STOP;
|
|
|
|
target: "hide";
|
|
|
|
target: "hide_start";
|
|
|
|
target: "hide_end";
|
|
|
|
after: "show_start";
|
|
|
|
}
|
|
|
|
program { name: "show_start";
|
|
|
|
action: STATE_SET "default" 0.0;
|
|
|
|
transition: LINEAR 0.2;
|
|
|
|
target: "shine";
|
|
|
|
after: "show_end";
|
|
|
|
}
|
|
|
|
program { name: "show_end";
|
|
|
|
action: SIGNAL_EMIT "elm,action,focus,show,end" "";
|
|
|
|
}
|
|
|
|
program { name: "hide";
|
|
|
|
signal: "elm,action,focus,hide";
|
|
|
|
source: "elm";
|
|
|
|
action: ACTION_STOP;
|
|
|
|
target: "show";
|
|
|
|
target: "show_start";
|
|
|
|
target: "show_end";
|
|
|
|
after: "hide_start";
|
|
|
|
}
|
|
|
|
program { name: "hide_start";
|
|
|
|
action: STATE_SET "disabled" 0.0;
|
|
|
|
transition: LINEAR 0.2;
|
|
|
|
target: "shine";
|
|
|
|
after: "hide_end";
|
|
|
|
}
|
|
|
|
program { name: "hide_end";
|
|
|
|
action: SIGNAL_EMIT "elm,action,focus,hide,end" "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
group { name: "elm/focus_highlight/bottom/default";
|
|
|
|
parts {
|
|
|
|
part { name: "shine";
|
|
|
|
type: RECT;
|
|
|
|
mouse_events: 1;
|
|
|
|
repeat_events: 1;
|
|
|
|
ignore_flags: ON_HOLD;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
color: 0 255 0 50;
|
|
|
|
rel1.offset: 0 0;
|
|
|
|
rel2.offset: 0 0;
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 0 0 0 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
program { name: "show";
|
|
|
|
signal: "elm,action,focus,show";
|
|
|
|
source: "elm";
|
|
|
|
action: ACTION_STOP;
|
|
|
|
target: "hide";
|
|
|
|
target: "hide_start";
|
|
|
|
target: "hide_end";
|
|
|
|
after: "show_start";
|
|
|
|
}
|
|
|
|
program { name: "show_start";
|
|
|
|
action: STATE_SET "default" 0.0;
|
|
|
|
transition: LINEAR 0.2;
|
|
|
|
target: "shine";
|
|
|
|
after: "show_end";
|
|
|
|
}
|
|
|
|
program { name: "show_end";
|
|
|
|
action: SIGNAL_EMIT "elm,action,focus,show,end" "";
|
|
|
|
}
|
|
|
|
program { name: "hide";
|
|
|
|
signal: "elm,action,focus,hide";
|
|
|
|
source: "elm";
|
|
|
|
action: ACTION_STOP;
|
|
|
|
target: "show";
|
|
|
|
target: "show_start";
|
|
|
|
target: "show_end";
|
|
|
|
after: "hide_start";
|
|
|
|
}
|
|
|
|
program { name: "hide_start";
|
|
|
|
action: STATE_SET "disabled" 0.0;
|
|
|
|
transition: LINEAR 0.2;
|
|
|
|
target: "shine";
|
|
|
|
after: "hide_end";
|
|
|
|
}
|
|
|
|
program { name: "hide_end";
|
|
|
|
action: SIGNAL_EMIT "elm,action,focus,hide,end" "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-08-23 00:44:49 -07:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
group { name: "elm/access/base/default";
|
|
|
|
images {
|
|
|
|
image: "access_glow.png" LOSSY 85;
|
|
|
|
}
|
|
|
|
parts {
|
|
|
|
part { name: "block1"; type: RECT;
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
color: 0 0 0 200;
|
|
|
|
rel1 { to: "base";
|
|
|
|
relative: 0.0 0.0;
|
|
|
|
offset: -100000 -100000;
|
|
|
|
}
|
|
|
|
rel2 { to: "base";
|
|
|
|
relative: 1.0 0.0;
|
|
|
|
offset: 100000 96;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "block2"; type: RECT;
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
color: 0 0 0 200;
|
|
|
|
rel1 { to: "base";
|
|
|
|
relative: 0.0 1.0;
|
|
|
|
offset: -100000 -97;
|
|
|
|
}
|
|
|
|
rel2 { to: "base";
|
|
|
|
relative: 1.0 1.0;
|
|
|
|
offset: 100000 100000;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "block3"; type: RECT;
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
color: 0 0 0 200;
|
|
|
|
rel1 { to: "block1";
|
|
|
|
relative: 0.0 1.0;
|
|
|
|
offset: 0 0;
|
|
|
|
}
|
|
|
|
rel2 { to_x: "base"; to_y: "block2";
|
|
|
|
relative: 0.0 0.0;
|
|
|
|
offset: 96 -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "block4"; type: RECT;
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
color: 0 0 0 200;
|
|
|
|
rel1 { to_x: "base"; to_y: "block1";
|
|
|
|
relative: 1.0 1.0;
|
|
|
|
offset: -97 0;
|
|
|
|
}
|
|
|
|
rel2 { to: "block2";
|
|
|
|
relative: 1.0 0.0;
|
|
|
|
offset: -1 -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "base";
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
image.normal: "access_glow.png";
|
|
|
|
image.border: 112 112 112 112;
|
|
|
|
rel1.offset: -102 -102;
|
|
|
|
rel2.offset: 101 101;
|
|
|
|
fill.smooth: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-02 02:47:05 -07:00
|
|
|
#include "widgets/bg.edc"
|
2012-01-02 17:38:53 -08:00
|
|
|
#include "widgets/border.edc"
|
2011-08-02 02:47:05 -07:00
|
|
|
#include "widgets/scroller.edc"
|
|
|
|
#include "widgets/label.edc"
|
|
|
|
#include "widgets/button.edc"
|
|
|
|
#include "widgets/toggle.edc"
|
|
|
|
#include "widgets/clock.edc"
|
2012-03-05 03:07:05 -08:00
|
|
|
#include "widgets/datetime.edc"
|
2011-08-02 02:47:05 -07:00
|
|
|
#include "widgets/menu.edc"
|
|
|
|
#include "widgets/frame.edc"
|
|
|
|
#include "widgets/tooltip.edc"
|
|
|
|
#include "widgets/hover.edc"
|
|
|
|
#include "widgets/ctxpopup.edc"
|
|
|
|
#include "widgets/entry.edc"
|
|
|
|
#include "widgets/bubble.edc"
|
|
|
|
#include "widgets/photo.edc"
|
|
|
|
#include "widgets/thumb.edc"
|
|
|
|
#include "widgets/icon.edc"
|
|
|
|
#include "widgets/toolbar.edc"
|
|
|
|
#include "widgets/notify.edc"
|
|
|
|
#include "widgets/slideshow.edc"
|
|
|
|
#include "widgets/win.edc"
|
|
|
|
#include "widgets/list.edc"
|
|
|
|
#include "widgets/slider.edc"
|
|
|
|
#include "widgets/actionslider.edc"
|
|
|
|
#include "widgets/genlist.edc"
|
|
|
|
#include "widgets/check.edc"
|
|
|
|
#include "widgets/radio.edc"
|
|
|
|
#include "widgets/progressbar.edc"
|
|
|
|
#include "widgets/separator.edc"
|
|
|
|
#include "widgets/spinner.edc"
|
|
|
|
#include "widgets/index.edc"
|
|
|
|
#include "widgets/gengrid.edc"
|
|
|
|
#include "widgets/photocam.edc"
|
|
|
|
#include "widgets/map.edc"
|
|
|
|
#include "widgets/panes.edc"
|
|
|
|
#include "widgets/panel.edc"
|
|
|
|
#include "widgets/conformant.edc"
|
|
|
|
#include "widgets/calendar.edc"
|
|
|
|
#include "widgets/colorselector.edc"
|
|
|
|
#include "widgets/flipselector.edc"
|
|
|
|
#include "widgets/diskselector.edc"
|
|
|
|
#include "widgets/fileselector.edc"
|
|
|
|
#include "widgets/layout.edc"
|
|
|
|
#include "widgets/segment_control.edc"
|
|
|
|
#include "widgets/player.edc"
|
|
|
|
#include "widgets/video.edc"
|
|
|
|
#include "widgets/naviframe.edc"
|
2011-11-23 17:06:26 -08:00
|
|
|
#include "widgets/multibuttonentry.edc"
|
2011-10-05 15:18:22 -07:00
|
|
|
#include "ews.edc"
|
2012-02-10 00:10:43 -08:00
|
|
|
#include "widgets/pointer.edc"
|
2010-10-28 10:23:53 -07:00
|
|
|
}
|