forked from enlightenment/efl
parent
403bb8baa3
commit
6099cd001a
|
@ -6,6 +6,7 @@ collections {
|
||||||
}
|
}
|
||||||
parts {
|
parts {
|
||||||
part { name: "under";
|
part { name: "under";
|
||||||
|
mouse_events: 0;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
align: 0.5 0.0;
|
align: 0.5 0.0;
|
||||||
aspect: 1.486068111 1.486068111;
|
aspect: 1.486068111 1.486068111;
|
||||||
|
@ -47,6 +48,7 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part { name: "over";
|
part { name: "over";
|
||||||
|
mouse_events: 0;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
align: 0.0 1.0;
|
align: 0.0 1.0;
|
||||||
aspect: 2.238095238 2.238095238;
|
aspect: 2.238095238 2.238095238;
|
||||||
|
|
|
@ -535,13 +535,14 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part { name: "over3";
|
part { name: "over3";
|
||||||
mouse_events: 0;
|
mouse_events: 1;
|
||||||
|
repeat_events: 1;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
visible: 0;
|
|
||||||
color: 255 255 255 0;
|
color: 255 255 255 0;
|
||||||
image {
|
image {
|
||||||
normal: "bt_glow.png";
|
normal: "bt_glow.png";
|
||||||
border: 12 12 12 12;
|
border: 12 12 12 12;
|
||||||
|
middle: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
description { state: "clicked" 0.0;
|
description { state: "clicked" 0.0;
|
||||||
|
@ -558,7 +559,6 @@ collections {
|
||||||
source: "over2";
|
source: "over2";
|
||||||
action: STATE_SET "clicked" 0.0;
|
action: STATE_SET "clicked" 0.0;
|
||||||
target: "button_image";
|
target: "button_image";
|
||||||
target: "over3";
|
|
||||||
}
|
}
|
||||||
program {
|
program {
|
||||||
name: "button_unclick";
|
name: "button_unclick";
|
||||||
|
@ -566,11 +566,25 @@ collections {
|
||||||
source: "over2";
|
source: "over2";
|
||||||
action: STATE_SET "default" 0.0;
|
action: STATE_SET "default" 0.0;
|
||||||
target: "button_image";
|
target: "button_image";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "button_click2";
|
||||||
|
signal: "mouse,down,1";
|
||||||
|
source: "over3";
|
||||||
|
action: STATE_SET "clicked" 0.0;
|
||||||
target: "over3";
|
target: "over3";
|
||||||
}
|
}
|
||||||
program {
|
program {
|
||||||
name: "button_unclick2";
|
name: "button_unclick2";
|
||||||
signal: "mouse,clicked,1";
|
signal: "mouse,up,1";
|
||||||
|
source: "over3";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
transition: DECELERATE 0.5;
|
||||||
|
target: "over3";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "button_unclick3";
|
||||||
|
signal: "mouse,up,1";
|
||||||
source: "over2";
|
source: "over2";
|
||||||
action: SIGNAL_EMIT "elm,action,click" "";
|
action: SIGNAL_EMIT "elm,action,click" "";
|
||||||
}
|
}
|
||||||
|
@ -2800,8 +2814,8 @@ collections {
|
||||||
{
|
{
|
||||||
style { name: "entry_single_textblock_style";
|
style { name: "entry_single_textblock_style";
|
||||||
base: "font=Sans font_size=10 align=left color=#000 wrap=none";
|
base: "font=Sans font_size=10 align=left color=#000 wrap=none";
|
||||||
// tag: "br" "\n";
|
tag: "br" "\n";
|
||||||
// tag: "tab" "\t";
|
tag: "tab" "\t";
|
||||||
tag: "em" "+ font=Sans:style=Oblique";
|
tag: "em" "+ font=Sans:style=Oblique";
|
||||||
tag: "b" "+ font=Sans:style=Bold";
|
tag: "b" "+ font=Sans:style=Bold";
|
||||||
tag: "link" "+ color=#800 underline=on underline_color=#8008";
|
tag: "link" "+ color=#800 underline=on underline_color=#8008";
|
||||||
|
|
|
@ -309,12 +309,11 @@ extern "C" {
|
||||||
// * need a phone-number widget (hilight country dial prefixes, add flags,
|
// * need a phone-number widget (hilight country dial prefixes, add flags,
|
||||||
// photos of contacts that match etc.)
|
// photos of contacts that match etc.)
|
||||||
// * need imageview widget (for large not iconic images)
|
// * need imageview widget (for large not iconic images)
|
||||||
// * labels with "" are 0x0 size, but with " " are correct vertically. check
|
|
||||||
// * tiled image + zoom widget (tiled map viewer)
|
// * tiled image + zoom widget (tiled map viewer)
|
||||||
// * dialpad widget - need one with a phone dialpad
|
// * dialpad widget - need one with a phone dialpad
|
||||||
// * scale property from e - watch for changes. also allow for env var option
|
// * scale property from e - watch for changes. also allow for env var option
|
||||||
// * on the fly theme changes - test
|
// * on the fly theme changes - test
|
||||||
// * single line entry on scale change adds newlines
|
// * single line entry on scale change adds newlines
|
||||||
// * scale change for hover doesnt seem to do new size alloc nicely
|
// * scale change for hover doesnt seem to do new size alloc nicely
|
||||||
// * click + drag on button in scrollvie leaves pressed glow
|
// * left/right arrow broken with password mode for entry
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -340,7 +340,9 @@ elm_entry_add(Evas_Object *parent)
|
||||||
edje_object_signal_callback_add(wd->ent, "anchor,mouse,in,*", "elm.text", _signal_anchor_in, obj);
|
edje_object_signal_callback_add(wd->ent, "anchor,mouse,in,*", "elm.text", _signal_anchor_in, obj);
|
||||||
edje_object_signal_callback_add(wd->ent, "anchor,mouse,out,*", "elm.text", _signal_anchor_out, obj);
|
edje_object_signal_callback_add(wd->ent, "anchor,mouse,out,*", "elm.text", _signal_anchor_out, obj);
|
||||||
edje_object_signal_callback_add(wd->ent, "entry,key,enter", "elm.text", _signal_key_enter, obj);
|
edje_object_signal_callback_add(wd->ent, "entry,key,enter", "elm.text", _signal_key_enter, obj);
|
||||||
|
edje_object_part_text_set(wd->ent, "elm.text", "<br>");
|
||||||
elm_widget_resize_object_set(obj, wd->ent);
|
elm_widget_resize_object_set(obj, wd->ent);
|
||||||
|
_sizing_eval(obj);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,6 +383,7 @@ EAPI void
|
||||||
elm_entry_entry_set(Evas_Object *obj, const char *entry)
|
elm_entry_entry_set(Evas_Object *obj, const char *entry)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
|
if (!entry) entry = "<br>";
|
||||||
edje_object_part_text_set(wd->ent, "elm.text", entry);
|
edje_object_part_text_set(wd->ent, "elm.text", entry);
|
||||||
// debug
|
// debug
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -6,6 +6,7 @@ typedef struct _Widget_Data Widget_Data;
|
||||||
struct _Widget_Data
|
struct _Widget_Data
|
||||||
{
|
{
|
||||||
Evas_Object *lbl;
|
Evas_Object *lbl;
|
||||||
|
const char *label;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void _del_hook(Evas_Object *obj);
|
static void _del_hook(Evas_Object *obj);
|
||||||
|
@ -16,12 +17,16 @@ static void
|
||||||
_del_hook(Evas_Object *obj)
|
_del_hook(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
|
if (wd->label) eina_stringshare_del(wd->label);
|
||||||
free(wd);
|
free(wd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_theme_hook(Evas_Object *obj)
|
_theme_hook(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
|
_elm_theme_set(wd->lbl, "label", "base", "default");
|
||||||
|
edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +58,10 @@ elm_label_add(Evas_Object *parent)
|
||||||
|
|
||||||
wd->lbl = edje_object_add(e);
|
wd->lbl = edje_object_add(e);
|
||||||
_elm_theme_set(wd->lbl, "label", "base", "default");
|
_elm_theme_set(wd->lbl, "label", "base", "default");
|
||||||
|
wd->label = eina_stringshare_add("<br>");
|
||||||
|
edje_object_part_text_set(wd->lbl, "elm.text", "<br>");
|
||||||
elm_widget_resize_object_set(obj, wd->lbl);
|
elm_widget_resize_object_set(obj, wd->lbl);
|
||||||
|
_sizing_eval(obj);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +69,9 @@ EAPI void
|
||||||
elm_label_label_set(Evas_Object *obj, const char *label)
|
elm_label_label_set(Evas_Object *obj, const char *label)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
|
if (!label) label = "";
|
||||||
|
if (wd->label) eina_stringshare_del(wd->label);
|
||||||
|
wd->label = eina_stringshare_add(label);
|
||||||
edje_object_part_text_set(wd->lbl, "elm.text", label);
|
edje_object_part_text_set(wd->lbl, "elm.text", label);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue