Commit 1e932e1f authored by Ludovic Fauvet's avatar Ludovic Fauvet

About view designed using edje

parent 0aa89f51
......@@ -69,6 +69,7 @@
#define VIDEOPLAYEREDJ get_resource_path( EDJPATH "/video_player.edj")
#define AUDIOPLAYERMINIEDJ get_resource_path( EDJPATH "/audio_player_mini.edj")
#define AUDIOPLAYEREDJ get_resource_path( EDJPATH "/audio_player.edj")
#define ABOUTEDJ get_resource_path( EDJPATH "/about.edj")
#define RES_DIR "/opt/usr/apps/" PACKAGE "/res/"
#define ICON_DIR RES_DIR "/images/"
......
collections {
group { name: "about";
parts {
part { name: "hub_background";
type: RECT;
description {
color: 255 255 255 255;
}
}
part { name: "apptitle";
type : TEXT;
scale: 1;
effect: SOFT_SHADOW;
description { state: "default" 0.0;
rel1.relative: 0.0 0.1;
rel2.relative: 1.0 0.0;
color: 255 136 0 255;
text {
text: "VLC for Tizen™";
size: 30;
}
}
}
part {
name: "cone";
type: SWALLOW;
description {
state: "default" 0.0;
rel1 {relative: 0.3 0.1;}
rel2 {relative: 0.7 0.4;}
}
}
part {
name: "description";
scale: 1;
type: SWALLOW;
description {
state: "default" 0.0;
rel1.relative: 0.05 0.4;
rel2.relative: 0.95 0.6;
}
}
part {
name: "copyright";
type: TEXT;
description {
state: "default" 0.0;
color: 90 90 90 255;
rel1.relative: 0.0 0.7;
rel2.relative: 1.0 1.0;
text {
align: 0.5 0.1;
size: 22;
text: "Copyleft © 1996-2015 by VideoLAN";
ellipsis: -1;
}
}
}
part {
name: "revision";
type: TEXT;
description {
state: "default" 0.0;
color: 120 120 120 255;
rel1.relative: 0.0 0.9;
rel2.relative: 1.0 1.0;
text {
align: 0.5 0.1;
size: 22;
text: "Revision";
ellipsis: -1;
}
}
}
}
}
}
\ No newline at end of file
......@@ -96,65 +96,37 @@ create_about_section(Evas_Object *parent)
{
/* Create layout and set the theme */
Evas_Object *layout = elm_layout_add(parent);
elm_layout_theme_set(layout, "layout", "application", "default");
/* Create the background */
Evas_Object *bg = elm_bg_add(layout);
elm_bg_color_set(bg, 255, 255, 255);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(bg);
/* Set the background to the theme */
elm_object_part_content_set(layout, "elm.swallow.bg", bg);
/* */
Evas_Object *box = elm_box_add(layout);
elm_box_horizontal_set(box, EINA_FALSE);
evas_object_size_hint_align_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(box);
/* Add and set the label in the box */
Evas_Object *lbl_about_title = elm_label_add(box);
evas_object_size_hint_align_set(lbl_about_title, EVAS_HINT_FILL, 0);
elm_object_text_set(lbl_about_title, "<font_size=32><align=center><b>VLC for Tizen™</b></align>");
elm_box_pack_end(box, lbl_about_title);
evas_object_show(lbl_about_title);
Evas_Object *cone = elm_image_add(box);
elm_layout_file_set(layout, ABOUTEDJ, "about");
/* Cone */
Evas_Object *cone = elm_image_add(layout);
evas_object_size_hint_align_set(cone, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(cone, EVAS_HINT_FILL, EVAS_HINT_EXPAND);
elm_image_file_set(cone, ICON_DIR"cone.png", NULL);
elm_box_pack_end(box, cone);
elm_object_part_content_set(layout, "cone", cone);
evas_object_show(cone);
Evas_Object *lbl_description = elm_label_add(box);
/* Description */
Evas_Object *lbl_description = elm_label_add(layout);
evas_object_size_hint_align_set(lbl_description, EVAS_HINT_FILL, 0);
evas_object_size_hint_weight_set(lbl_description, EVAS_HINT_FILL, EVAS_HINT_EXPAND);
elm_label_line_wrap_set(lbl_description, ELM_WRAP_MIXED);
elm_object_text_set(lbl_description, "<font_size=18><align=center>VLC for Tizen™ is a port of VLC media player, the popular open-source media player."
"<br><br>Copyleft © 1996-2015 by VideoLAN</align>");
elm_box_pack_end(box, lbl_description);
elm_object_text_set(lbl_description, "<font-size=22><align=center>VLC for Tizen™ is a port of VLC media player, the popular open-source media player.");
elm_object_part_content_set(layout, "description", lbl_description);
evas_object_show(lbl_description);
Evas_Object *lbl_version = elm_label_add(box);
evas_object_size_hint_align_set(lbl_version, EVAS_HINT_FILL, 0);
evas_object_size_hint_weight_set(lbl_version, EVAS_HINT_FILL, EVAS_HINT_EXPAND);
elm_label_line_wrap_set(lbl_version, ELM_WRAP_MIXED);
elm_object_text_set(lbl_version, "<font_size=18><align=center>Revision " REVISION "</align>");
elm_box_pack_end(box, lbl_version);
evas_object_show(lbl_version);
/* Revision number */
elm_object_part_text_set(layout, "revision", REVISION);
/* Handle cone animation */
cone_animation *anim = malloc(sizeof(*anim));
anim->initial_y = -1; // Initial position unknown
anim->obj = cone;
anim->container = box;
anim->container = layout;
evas_object_smart_callback_add(cone, "clicked", cone_clicked_cb, anim);
evas_object_event_callback_add(box, EVAS_CALLBACK_FREE, cone_delete_cb, anim);
/* Set the content to the theme */
elm_object_part_content_set(layout, "elm.swallow.content", box);
evas_object_event_callback_add(layout, EVAS_CALLBACK_FREE, cone_delete_cb, anim);
/* */
evas_object_show(layout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment