rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=134d1724331325a210881fd9f4fd22b4964a9904
commit 134d1724331325a210881fd9f4fd22b4964a9904 Author: Vitalii Vorobiov <[email protected]> Date: Thu Oct 8 16:35:09 2015 +0300 layout.edc: just a layout for image preview (with aspect) --- data/themes/default/widgets/layout.edc | 312 ++------------------------------- 1 file changed, 16 insertions(+), 296 deletions(-) diff --git a/data/themes/default/widgets/layout.edc b/data/themes/default/widgets/layout.edc index ab62f70..defb469 100644 --- a/data/themes/default/widgets/layout.edc +++ b/data/themes/default/widgets/layout.edc @@ -2598,319 +2598,39 @@ group { name: "elm/layout/image_editor/default"; } } -group { name: "elm/layout/image_editor/usage_info"; +group { name: "elm/layout/image_editor/preview"; parts { - part { name: "padding.top.left"; - type: SPACER; - description { state: "default" 0.0; - align: 0.0 0.0; - PADDING_SIZE_SET; - } - } - part { name: "padding.bottom.right"; - type: SPACER; - description { state: "default" 0.0; - align: 1.0 1.0; - PADDING_SIZE_SET; - } - } - part { name: "area.usage_info"; - type: SPACER; - description { state: "default" 0.0; - rel1 { - to: "padding.top.left"; - relative: 1.0 1.0; - } - rel2 { - to: "padding.bottom.right"; - relative: 0.0 0.0; - } - } - } - part { name: "eflete.swallow.search_line"; - type: SWALLOW; - description { state: "default" 0.0; - align: 0.0 0.0; - min: 80 30; - rel1.to: "area.usage_info"; - rel2.to: "area.usage_info"; - } - } - part { name: "padding.genlist"; - type: SPACER; - description { state: "default" 0.0; - align: 1.0 0.0; - PADDING_SIZE_SET; - rel1 { - to_y: "eflete.swallow.search_line"; - relative: 0.0 1.0; - } - } - } - part { name: "eflete.swallow.genlist"; - type: SWALLOW; - description { state: "default" 0.0; - align: 0.0 0.0; - rel1 { - to_y: "padding.genlist"; - to_x: "area.usage_info"; - relative: 0.0 1.0; - } - rel2.to: "area.usage_info"; - } - } - } -} - -#undef BTNS_LARGE_SIZE_SET -#undef BTNS_SMALL_SIZE_SET - -#define ITEM_COLOR 223 219 210 255; - -#define ITEM_ADD(_name, _label_width) \ - part { name: "padding."#_name"_label_left"; \ - type: SPACER; \ - description { state: "default" 0.0; \ - PADDING_SIZE_SET; \ - align: 0.0 0.0; \ - rel1.to: "area."#_name; \ - rel2.to: "area."#_name; \ - } \ - } \ - part { name: "padding."#_name"_label_right"; \ - type: SPACER; \ - description { state: "default" 0.0; \ - PADDING_SIZE_SET; \ - align: 1.0 1.0; \ - rel1.to: "area."#_name; \ - rel2.to: "area."#_name; \ - } \ - } \ - part { name: "area."#_name"_label"; \ - type: SPACER; \ - scale: 1; \ - description { state: "default" 0.0; \ - align: 0.0 0.0; \ - rel1 { \ - to: "padding."#_name"_label_left"; \ - relative: 1.0 1.0; \ - } \ - rel2 { \ - to_x: "area."#_name; \ - to_y: "padding."#_name"_label_right"; \ - relative: _label_width 0.0; \ - } \ - } \ - } \ - part { name: "label."#_name; \ - type: TEXT; \ - scale: 1; \ - mouse_events: 0; \ - description { state: "default" 0.0; \ - align: 0.0 0.5; \ - fixed: 1 0; \ - color: ITEM_COLOR; \ - text { \ - text: #_name":"; \ - font: FN; \ - size: 12; \ - ellipsis: -1; \ - align: 0.0 0.5; \ - min: 0 0; \ - max: 1 1; \ - } \ - rel1.to: "area."#_name"_label"; \ - rel2.to: "area."#_name"_label"; \ - } \ - } \ - part { name: "area."#_name"_content"; \ - type: SPACER; \ - scale: 1; \ - description { state: "default" 0.0; \ - align: 0.0 0.0; \ - rel1 { \ - to: "area."#_name"_label"; \ - relative: 1.0 0.0; \ - } \ - rel2 { \ - to: "padding."#_name"_label_right"; \ - relative: 0.0 0.0; \ - } \ - } \ - } - -#define TEXT_PART_ADD(_part_name, _area_name) \ - part { name: _part_name; \ - type: TEXT; \ - description { state: "default" 0.0; \ - text { \ - font: FN; \ - size: 12; \ - min: 1 1; \ - ellipsis: -1; \ - align: 0.0 0.5; \ - } \ - color: 182 182 182 255; \ - rel1.to: _area_name; \ - rel2.to: _area_name; \ - } \ - } - -#define FIELD_GEOMETRY_SET \ - align: 0.0 0.0; \ - min: 40 30; \ - max: -1 30; - -group { name: "elm/layout/image_editor/image_info"; - parts { - part { name: "padding.top"; - type: SPACER; + part { name: "image_preview_decoration"; + type: IMAGE; description { state: "default" 0.0; align: 0.0 0.0; - PADDING_SIZE_SET; - } - } - part { name: "area.name"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - FIELD_GEOMETRY_SET; - rel1 { - to_y: "padding.top"; - relative: 0.0 1.0; - } - } - } - ITEM_ADD(name, 0.3); - part { name: "eflete.swallow.image_info.name"; - type: SWALLOW; - description { state: "default" 0.0; - fixed: 0 1; - rel1.to: "area.name_content"; - rel2.to: "area.name_content"; - } - } - - part { name: "area.location"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - FIELD_GEOMETRY_SET; - rel1 { - to: "area.name"; - relative: 0.0 1.0; - } - } - } - ITEM_ADD(location, 0.3); - TEXT_PART_ADD("text.location", "area.location_content"); - - part { name: "area.type"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - FIELD_GEOMETRY_SET; - rel1 { - to: "area.location"; - relative: 0.0 1.0; - } - } - } - ITEM_ADD(type, 0.3); - TEXT_PART_ADD("text.type", "area.type_content"); - - part { name: "area.compression"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - FIELD_GEOMETRY_SET; - rel1 { - to: "area.type"; - relative: 0.0 1.0; + fixed: 1 1; + aspect: 1.0 1.0; + aspect_preference: BOTH; + color: 48 48 48 255; + image { + normal: "border_1.png"; + border: 1 1 1 1; + middle: NONE; } } } - ITEM_ADD(compression, 0.3); - part { name: "eflete.swallow.compression_type"; + part { name: "eflete.swallow.image"; type: SWALLOW; description { state: "default" 0.0; - rel1.to: "area.compression_content"; - rel2 { - to: "area.compression_content"; - relative: 0.5 1.0; - } - } - } - part { name: "area.quality"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; rel1 { - to_x: "eflete.swallow.compression_type"; - to_y: "area.compression"; - relative: 1.0 0.0; - } - rel2.to: "area.compression"; - } - } - ITEM_ADD(quality, 0.5); - part { name: "eflete.swallow.compression_quality"; - type: SWALLOW; - description { state: "default" 0.0; - rel1.to: "area.quality_content"; - rel2.to: "area.quality_content"; - } - } - - part { name: "area.image"; - type: SPACER; - scale: 1; - description { state: "default" 0.0; - FIELD_GEOMETRY_SET; - rel1 { - to: "area.compression"; - relative: 0.0 1.0; - } - } - } - ITEM_ADD(image, 0.3); - part { name: "area.width"; - type: SPACER; - description { state: "default" 0.0; - rel1 { - to_x: "area.image_content"; - to_y: "area.image"; + offset: 2 2; + to: "image_preview_decoration"; } rel2 { - to_y: "area.image"; - to_x: "area.image_content"; - relative: 0.5 1.0; + offset: -3 -3; + to: "image_preview_decoration"; } } } - part { name: "area.height"; - type: SPACER; - description { state: "default" 0.0; - rel1 { - to_x: "area.width"; - to_y: "area.image"; - relative: 1.0 0.0; - } - rel2.to: "area.image"; - } - } - ITEM_ADD(width, 0.5); - ITEM_ADD(height, 0.5); - TEXT_PART_ADD("text.width", "area.width_content"); - TEXT_PART_ADD("text.height", "area.height_content"); } } -#undef ITEM_ADD -#undef TEXT_PART_ADD -#undef FIELD_GEOMETRY_SET -#undef PADDING_SIZE_SET - group { name: "elm/layout/sound_editor/default"; images { image: "separator-horizontal.png" COMP; --
