}
}
-group{ "elm/button/base/gallery_image";
+images {
+ image: "gallery_thumbnail_circle_04.png" COMP;
+ image: "gallery_circle_basic.png" COMP;
+}
+
+group{ "elm/button/base/gallery_image_thumb";
inherit: "elm/button/base/transparent";
parts {
rect { "rect.bg";
before: "swallow.bg";
+ clip_to: "image_mask";
desc { "default";
color: GALLERY_COLOR_IMG_BG;
}
}
swallow { "swallow.bg";
before: "elm.swallow.content";
+ clip_to: "image_mask";
+ desc { "default";
+ }
+ }
+ swallow { "elm.swallow.content";
+ scale;
+ clip_to: "image_mask";
desc { "default";
}
}
rect { "event";
norepeat;
+ clip_to: "image_mask";
desc { "default";
color: GALLERY_COLOR_IMG_EF_NORMAL;
}
color: GALLERY_COLOR_IMG_EF_DISABLED;
}
}
+ image { "image_mask";
+ precise;
+ desc { "default";
+ image.normal: "gallery_thumbnail_circle_04.png";
+ }
+ }
rect { "blocker";
norepeat;
desc { "default";
}
}
+group{ "elm/button/base/gallery_image_full";
+ inherit: "elm/button/base/gallery_image_thumb";
+ parts {
+ image { "image_mask";
+ precise;
+ desc { "default";
+ image.normal: "gallery_circle_basic.png";
+ }
+ }
+ }
+}
+
#define GALLERY_VIDEO_BTN(style_name, size, icon_img, effect_img) \
group{ "elm/button/base/"style_name; \
inherit: "elm/button/base/transparent"; \
rel2.relative: 1.00 1.00;
}
}
- image { "image_mask_0";
+ swallow { "swallow.cell_0";
scale;
- precise;
desc { "default";
- image.normal: "gallery_thumbnail_circle_04.png";
align: 0.5 0.5;
fixed: 0 1;
min: 114 116;
rel2.relative: 1.00 0.00;
}
}
- swallow { "swallow.cell_0";
- desc { "default";
- fixed: 1 1;
- clip_to: "image_mask_0";
- rel1.to: "image_mask_0";
- rel2.to: "image_mask_0";
- }
- }
}
}
group { "elm/layout/gallery_image_grid/hcomb_3x3_odd";
rel2.relative: 1.00 0.00;
}
}
- image { "image_mask_0";
+ swallow { "swallow.cell_0";
scale;
- precise;
desc { "default";
- image.normal: "gallery_thumbnail_circle_04.png";
align: 0.5 1.0;
fixed: 1 1;
min: 114 116;
rel2.relative: 0.50 0.00;
}
}
- image { "image_mask_1";
+ swallow { "swallow.cell_1";
scale;
- precise;
desc { "default";
- image.normal: "gallery_thumbnail_circle_04.png";
align: 0.5 0.0;
fixed: 1 1;
min: 114 116;
rel2.relative: 0.50 1.00;
}
}
- swallow { "swallow.cell_0";
- desc { "default";
- fixed: 1 1;
- clip_to: "image_mask_0";
- rel1.to: "image_mask_0";
- rel2.to: "image_mask_0";
- }
- }
- swallow { "swallow.cell_1";
- desc { "default";
- fixed: 1 1;
- clip_to: "image_mask_1";
- rel1.to: "image_mask_1";
- rel2.to: "image_mask_1";
- }
- }
}
}
group { "elm/layout/gallery_image_grid/linear";
max: (25 + 216) (25 + 216);
}
}
- image { "image_mask_0";
+ swallow { "swallow.cell_0";
scale;
- precise;
desc { "default";
- image.normal: "gallery_circle_basic.png";
fixed: 1 1;
min: 360 360;
max: 360 360;
max: (216 + 4) (216 + 4);
}
}
- swallow { "swallow.cell_0";
- desc { "default";
- fixed: 1 1;
- clip_to: "image_mask_0";
- rel1.to: "image_mask_0";
- rel2.to: "image_mask_0";
- }
- }
image { "select_ring_0";
scale;
repeat;
action: STATE_SET "select_mode";
transition: DECELERATE 0.3;
target: "spacer";
- target: "image_mask_0";
+ target: "swallow.cell_0";
after: "transition_finished";
}
program { "gallery,force,select,mode";
source: "";
action: STATE_SET "select_mode";
target: "spacer";
- target: "image_mask_0";
+ target: "swallow.cell_0";
}
program { "gallery,disable,select,mode";
signal: "gallery,disable,select,mode";
action: STATE_SET "default";
transition: DECELERATE 0.3;
target: "spacer";
- target: "image_mask_0";
+ target: "swallow.cell_0";
after: "transition_finished";
}
program { "transition_finished";
{"gallery,transition,finished"};
// Related to Button //
- constexpr ElmStyle ITEM_BTN_STYLE {"gallery_image"};
constexpr EdjePart BTN_PART_BG {"swallow.bg"};
constexpr EdjeSignal BTN_BLOCK_CLICKS {"gallery,block,clicks"};
constexpr EdjeSignal BTN_UNBLOCK_CLICKS {"gallery,unblock,clicks"};
struct ImageGrid::Info {
const std::array<LayoutTheme, 2> slotThemes;
const std::array<int, 2> slotLens;
+ const ElmStyle btnStyle;
const int scrollLimit;
const int slotsPerPage;
const bool isHorizontal;
Info(const std::array<LayoutTheme, 2> &slotThemes,
const std::array<int, 2> &slotLens,
+ const ElmStyle btnStyle,
const int scrollLimit, const int slotsPerPage,
const bool isHorizontal) :
slotThemes(slotThemes),
slotLens(slotLens),
+ btnStyle(btnStyle),
scrollLimit(scrollLimit),
slotsPerPage(slotsPerPage),
isHorizontal(isHorizontal)
}
HcombInfo(const int totalLength,
- const std::array<LayoutTheme, 2> &slotThemes) :
+ const std::array<LayoutTheme, 2> &slotThemes,
+ const ElmStyle btnStyle) :
Info(slotThemes, {{(totalLength / 2), ceilDiv<2>(totalLength)}},
- impl::HCOMB_SCROLL_LIMIT, 1, true),
+ btnStyle, impl::HCOMB_SCROLL_LIMIT, 1, true),
totalLength(totalLength)
{
}
return (itemCount * 2);
}
- LinearInfo(const LayoutTheme &slotTheme, const bool isHorizontal) :
- Info({{slotTheme}}, {{1, 0}}, 1, 1, isHorizontal)
+ LinearInfo(const LayoutTheme &slotTheme, const ElmStyle btnStyle,
+ const bool isHorizontal) :
+ Info({{slotTheme}}, {{1, 0}}, btnStyle, 1, 1, isHorizontal)
{
}
};
m_image(evas_object_image_filled_add(m_btn.getEvas()))
{
m_btn.setFocusAlowed(false);
- m_btn.setStyle(impl::ITEM_BTN_STYLE);
+ m_btn.setStyle(imageGrid.m_info.btnStyle);
show(m_btn);
m_btn.setContent(m_image);
case Type::HCOMB_3X3: {
static HcombInfo info{3, {{
{"layout", "gallery_image_grid", "hcomb_3x3_even"},
- {"layout", "gallery_image_grid", "hcomb_3x3_odd"}}}};
+ {"layout", "gallery_image_grid", "hcomb_3x3_odd"}}},
+ ElmStyle{"gallery_image_thumb"}};
return info;
}
case Type::LINEAR:
default: {
static LinearInfo info{
- {"layout", "gallery_image_grid", "linear"}, true};
+ {"layout", "gallery_image_grid", "linear"},
+ ElmStyle{"gallery_image_full"}, true};
return info;
}
}