-id ${CMAKE_CURRENT_SOURCE_DIR}/data/images
${CMAKE_SOURCE_DIR}/data/themes/cbhmdrawer.edc ${CMAKE_BINARY_DIR}/data/themes/cbhmdrawer.edj
DEPENDS ${CMAKE_SOURCE_DIR}/data/themes/cbhmdrawer.edc
+ DEPENDS ${CMAKE_SOURCE_DIR}/data/themes/extstyles.edc
)
ADD_DEPENDENCIES(${PROJECT_NAME} cbhmdrawer.edj)
collections
{
+
+#include "extstyles.edc"
+
group
{
name: "cbhmdrawer";
description
{
state: "default" 0.0;
- rel1 { relative: 0.0916666666 0.4626865672; to: "background"; }
- rel2 { relative: 0.98125 1.0; to: "background"; }
+ rel1 { relative: 0.0856666666 0.4505; to: "background"; }
+ rel2 { relative: 0.98725 1.0; to: "background"; }
image
{
normal: "clipboard_panel_list_bg.png";
}
} //programs
} // group
+
+/*
+#define BEAT_GENLIST_PART_BASE( param_item_height ) \
+ part { name: "base"; \
+ type: RECT; \
+ repeat_events: 1; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: 0 param_item_height; \
+ color: 246 245 237 255; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_BG_IMAGE \
+ part { name: "bg_image"; \
+ clip_to: "disclip"; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ visible: 0; \
+ image.normal: "00_list_bar_press_1x80.png"; \
+ } \
+ description { state: "selected" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_BOTTOM_LINE \
+ part { name: "bottom_line"; \
+ type: RECT; \
+ clip_to: "disclip"; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ min: 0 1; \
+ fixed: 0 1; \
+ visible: 1; \
+ color: 212 212 212 255; \
+ rel1 { \
+ relative: 0.0 1.0; \
+ offset: 0 -1; \
+ } \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_PADDING_LEFT( param_padding_size ) \
+ part { name: "elm.padding.left"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: param_padding_size 0; \
+ fixed: 1 0; \
+ visible: 0; \
+ rel2.relative: 0.0 1.0; \
+ align: 0.0 0.0; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
+ part { name: "elm.padding.right"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: param_padding_size 0; \
+ fixed: 1 0; \
+ visible: 0; \
+ rel1.relative: 1.0 0.0; \
+ align: 1.0 0.0; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_DISCLIP \
+ part { name: "disclip"; \
+ type: RECT; \
+ description { state: "default" 0.0; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 64; \
+ } \
+ }
+
+ group { name: "elm/genlist/item/default/extended/historylist";
+ alias: "elm/genlist/item_odd/default/extended/historylist";
+ alias: "elm/list/item/extended/historylist";
+ alias: "elm/list/item_odd/extended/historylist";
+ alias: "elm/list/item_compress/extended/historylist";
+ alias: "elm/list/item_compress_odd/extended/historylist";
+
+ data.item: "stacking" "above";
+ data.item: "selectraise" "on";
+ data.item: "labels" "elm.text";
+ data.item: "icons" "elm.swallow.icon elm.swallow.end";
+ images {
+ image: "00_list_bar_press_1x80.png" COMP;
+ }
+ parts {
+ BEAT_GENLIST_PART_BASE( 60 )
+ BEAT_GENLIST_PART_BG_IMAGE
+ BEAT_GENLIST_PART_BOTTOM_LINE
+ BEAT_GENLIST_PART_PADDING_LEFT( 15 )
+ BEAT_GENLIST_PART_PADDING_RIGHT( 15 )
+ part { name: "elm.swallow.end";
+ clip_to: "disclip";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1.to_x: "elm.padding.right";
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "elm.padding.right";
+ }
+ }
+ }
+ part { name: "elm.text";
+ clip_to: "disclip";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: 0 0;
+ to_x: "elm.swallow.icon";
+ }
+ rel2 {
+ to_x: "elm.swallow.end";
+ relative: 0.0 1.0;
+ offset: 0 0;
+ }
+ color: 0 0 0 255;
+ text {
+ font: "SLP:style=Roman";
+ size: 32;
+ min: 0 1;
+ align: 0.0 0.5;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ color: 225 225 225 255;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ clip_to: "disclip";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 0.0 0.5;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "elm.padding.left";
+ }
+ rel2.to_x: "elm.padding.left";
+ }
+ }
+ BEAT_GENLIST_PART_DISCLIP
+ } // parts
+ programs {
+ // signal: elm,state,%s,active
+ // a "check" item named %s went active
+ // signal: elm,state,%s,passive
+ // a "check" item named %s went passive
+ // default is passive
+ program { name: "go_active";
+ signal: "elm,state,selected";
+ source: "elm";
+ action: STATE_SET "selected" 0.0;
+ target: "bg_image";
+ target: "elm.text";
+ }
+ program { name: "go_passive";
+ signal: "elm,state,unselected";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg_image";
+ target: "elm.text";
+ transition: LINEAR 0.1;
+ }
+ program { name: "go_disabled";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disclip";
+ }
+ program { name: "go_enabled";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disclip";
+ }
+ } // programs
+ } // group
+*/
} // collections
--- /dev/null
+#define BEAT_GENLIST_PART_BASE( param_item_height ) \
+ part { name: "base"; \
+ type: RECT; \
+ repeat_events: 1; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: 0 param_item_height; \
+ color: 246 245 237 255; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_BG_IMAGE \
+ part { name: "bg_image"; \
+ clip_to: "disclip"; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ visible: 0; \
+ image.normal: "00_list_bar_press_1x80.png"; \
+ } \
+ description { state: "selected" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_BOTTOM_LINE \
+ part { name: "bottom_line"; \
+ type: RECT; \
+ clip_to: "disclip"; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ min: 0 1; \
+ fixed: 0 1; \
+ visible: 1; \
+ color: 212 212 212 255; \
+ rel1 { \
+ relative: 0.0 1.0; \
+ offset: 0 -1; \
+ } \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_PADDING_LEFT( param_padding_size ) \
+ part { name: "elm.padding.left"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: param_padding_size 0; \
+ fixed: 1 0; \
+ visible: 0; \
+ rel2.relative: 0.0 1.0; \
+ align: 0.0 0.0; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
+ part { name: "elm.padding.right"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: param_padding_size 0; \
+ fixed: 1 0; \
+ visible: 0; \
+ rel1.relative: 1.0 0.0; \
+ align: 1.0 0.0; \
+ } \
+ }
+
+#define BEAT_GENLIST_PART_DISCLIP \
+ part { name: "disclip"; \
+ type: RECT; \
+ description { state: "default" 0.0; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ color: 255 255 255 64; \
+ } \
+ }
+
+ group { name: "elm/genlist/item/default/extended/historylist";
+ alias: "elm/genlist/item_odd/default/extended/historylist";
+ alias: "elm/list/item/extended/historylist";
+ alias: "elm/list/item_odd/extended/historylist";
+ alias: "elm/list/item_compress/extended/historylist";
+ alias: "elm/list/item_compress_odd/extended/historylist";
+
+ data.item: "stacking" "above";
+ data.item: "selectraise" "on";
+ data.item: "labels" "elm.text";
+ data.item: "icons" "elm.swallow.icon elm.swallow.end";
+ images {
+ image: "00_list_bar_press_1x80.png" COMP;
+ }
+ parts {
+ BEAT_GENLIST_PART_BASE(60)
+ BEAT_GENLIST_PART_BG_IMAGE
+ BEAT_GENLIST_PART_BOTTOM_LINE
+ BEAT_GENLIST_PART_PADDING_LEFT(15)
+ BEAT_GENLIST_PART_PADDING_RIGHT(15)
+ part { name: "elm.swallow.end";
+ clip_to: "disclip";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1.to_x: "elm.padding.right";
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "elm.padding.right";
+ }
+ }
+ }
+ part { name: "elm.text";
+ clip_to: "disclip";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: 0 0;
+ to_x: "elm.swallow.icon";
+ }
+ rel2 {
+ to_x: "elm.swallow.end";
+ relative: 0.0 1.0;
+ offset: 0 0;
+ }
+ color: 0 0 0 255;
+ text {
+ font: "SLP:style=Roman";
+ size: 32;
+ min: 0 1;
+ align: 0.0 0.5;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ color: 225 225 225 255;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ clip_to: "disclip";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 0.0 0.5;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "elm.padding.left";
+ }
+ rel2.to_x: "elm.padding.left";
+ }
+ }
+ BEAT_GENLIST_PART_DISCLIP
+ } // parts
+ programs {
+ // signal: elm,state,%s,active
+ // a "check" item named %s went active
+ // signal: elm,state,%s,passive
+ // a "check" item named %s went passive
+ // default is passive
+ program { name: "go_active";
+ signal: "elm,state,selected";
+ source: "elm";
+ action: STATE_SET "selected" 0.0;
+ target: "bg_image";
+ target: "elm.text";
+ }
+ program { name: "go_passive";
+ signal: "elm,state,unselected";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg_image";
+ target: "elm.text";
+ transition: LINEAR 0.1;
+ }
+ program { name: "go_disabled";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disclip";
+ }
+ program { name: "go_enabled";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disclip";
+ }
+ } // programs
+ } // group
ad->evas = evas_object_evas_get(win);
ad->win_main = win;
- ly = load_edj(win, EDJ_FILE, GRP_MAIN);
+ ly = load_edj(win, APP_EDJ_FILE, GRP_MAIN);
if (ly == NULL)
return -1;
elm_win_resize_object_add(win, ly);
#define LOCALEDIR "/usr/share/locale"
#define EDJ_PATH "/usr/share/edje"
-#define EDJ_FILE "/usr/share/edje/cbhmdrawer.edj"
+#define APP_EDJ_FILE EDJ_PATH"/cbhmdrawer.edj"
+//#define EXTSTYLE_EDJ_FILE EDJ_PATH"/extstyles.edj"
#define GRP_MAIN "cbhmdrawer"
struct appdata
ad->txtlist = elm_list_add(ad->win_main);
elm_layout_content_set(ad->ly_main, "texthistory/list", ad->txtlist);
- elm_list_horizontal_mode_set(ad->txtlist, ELM_LIST_COMPRESS);
+ elm_theme_extension_add(NULL, APP_EDJ_FILE);
+ elm_object_style_set(ad->txtlist, "extended/historylist");
+ evas_object_size_hint_weight_set(ad->txtlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_smart_callback_add(ad->txtlist, "selected", _list_click, ad);
elm_list_item_append(ad->txtlist, "default", NULL, NULL, NULL, ad);