}
}
- group { LAYOUT_MEMO_IMAGE;
- parts {
- spacer { "spacer.left_top"; scale;
- desc { "default";
- min: IMAGE_LTRB IMAGE_LTRB;
- align: 0.0 0.0;
- rel2.relative: 0.0 0.0;
- }
- }
- spacer { "spacer.right_bottom"; scale;
- desc { "default";
- min: IMAGE_LTRB IMAGE_LTRB;
- align: 1.0 1.0;
- rel1.relative: 1.0 1.0;
- }
- }
- image { "image.mask"; precise;
- desc { "default";
- rel1 { relative: 1.0 1.0; to: "spacer.left_top"; }
- rel2 { relative: 0.0 0.0; to: "spacer.right_bottom"; }
- image.normal: MEMO_BG;
- }
- }
- swallow { PART_IMAGE;
- clip: "image.mask";
- desc { "default";
- rel1.to: "image.mask";
- rel2.to: "image.mask";
- }
- }
- }
- }
-
group { "elm/gengrid/item/"STYLE_ITEM_MEMO"/default";
data.item: "texts" PART_TITLE;
data.item: "contents" PART_BG" "PART_CHECK" "PART_CONTENT" "PART_IMAGE;
rel2 { relative: 0.0 0.0; to_x: PART_CHECK; to_y: PART_SOUND; }
}
}
- swallow { PART_IMAGE;
- before: "image.effect_bg";
+ spacer { "spacer.image.left_top"; scale;
desc { "default";
+ min: IMAGE_LTRB IMAGE_LTRB;
+ align: 0.0 0.0;
rel1 { relative: 0.0 1.0; to_x: PART_BG; to_y: "spacer.title.bottom"; }
- rel2.to: PART_BG;
+ rel2 { relative: 0.0 1.0; to_x: PART_BG; to_y: "spacer.title.bottom"; }
}
desc { "full";
+ min: IMAGE_LTRB IMAGE_LTRB;
+ align: 0.0 0.0;
+ rel1.to: PART_BG;
+ rel2 { relative: 0.0 0.0; to: PART_BG; }
+ }
+ }
+ spacer { "spacer.image.right_bottom"; scale;
+ desc { "default";
+ min: IMAGE_LTRB IMAGE_LTRB;
+ align: 1.0 1.0;
+ rel1 { relative: 1.0 1.0; to: PART_BG; }
+ rel2.to: PART_BG;
+ }
+ }
+ image { "image.mask"; precise;
+ desc { "default";
+ rel1 { relative: 1.0 1.0; to: "spacer.image.left_top"; }
+ rel2 { relative: 0.0 0.0; to: "spacer.image.right_bottom"; }
+ image.normal: MEMO_BG;
+ }
+ }
+ swallow { PART_IMAGE;
+ before: "image.effect_bg";
+ clip: "image.mask";
+ desc { "default";
rel1.to: PART_BG;
rel2.to: PART_BG;
}
source: "elm";
action: STATE_SET "default" 0.0;
target: PART_CONTENT;
- target: PART_IMAGE;
+ target: "spacer.image.left_top";
}
program {
signal: "elm,state,"PART_TITLE",passive";
source: "elm";
action: STATE_SET "full" 0.0;
target: PART_CONTENT;
- target: PART_IMAGE;
+ target: "spacer.image.left_top";
}
program {
signal: "elm,state,"PART_CONTENT",active";
Evas_Object *MemoItem::createImage(Evas_Object *parent) const
{
- Evas_Object *layout = elm_layout_add(parent);
- elm_layout_file_set(layout, App::getResourcePath(MEMO_ITEM_EDJ).c_str(), LAYOUT_MEMO_IMAGE);
-
- Evas_Object *image = elm_image_add(layout);
+ Evas_Object *image = elm_image_add(parent);
elm_image_aspect_fixed_set(image, EINA_FALSE);
elm_image_file_set(image, m_Memo.getThumbnail().getPath().c_str(), nullptr);
- elm_object_part_content_set(layout, PART_IMAGE, image);
- return layout;
+ return image;
}
Evas_Object *MemoItem::createBg(Evas_Object *parent, const Color &color) const