TizenRefApp-8600 [Gallery] Update edc styles for correct Accessibility 67/131667/1
authorIgor Nazarov <i.nazarov@samsung.com>
Tue, 30 May 2017 10:00:29 +0000 (13:00 +0300)
committerIgor Nazarov <i.nazarov@samsung.com>
Tue, 30 May 2017 10:00:29 +0000 (13:00 +0300)
highlight

Change-Id: I1deb42fe11171a041fb0f21216e818463a20a30d

edc/button.edc
edc/image-grid.edc
src/view/ImageGrid.cpp

index e6b652e918a25a2e2aedfc23335b14ba9a014a37..6c7145952672ce9f453dbb95f8cb7ef8911464f2 100644 (file)
@@ -130,22 +130,36 @@ group{ "elm/button/base/transparent";
    }
 }
 
-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;
          }
@@ -158,6 +172,12 @@ group{ "elm/button/base/gallery_image";
             color: GALLERY_COLOR_IMG_EF_DISABLED;
          }
       }
+      image { "image_mask";
+         precise;
+         desc { "default";
+            image.normal: "gallery_thumbnail_circle_04.png";
+         }
+      }
       rect { "blocker";
          norepeat;
          desc { "default";
@@ -210,6 +230,18 @@ group{ "elm/button/base/gallery_image";
    }
 }
 
+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"; \
index 842a3cecd53946c453f1188aa370d516004ca8a4..976a2f3379762ae0e39002a0256de6ebdef92d6e 100644 (file)
@@ -42,11 +42,9 @@ group { "elm/layout/gallery_image_grid/hcomb_3x3_even";
             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;
@@ -57,14 +55,6 @@ group { "elm/layout/gallery_image_grid/hcomb_3x3_even";
             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";
@@ -102,11 +92,9 @@ 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;
@@ -117,11 +105,9 @@ group { "elm/layout/gallery_image_grid/hcomb_3x3_odd";
             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;
@@ -132,22 +118,6 @@ group { "elm/layout/gallery_image_grid/hcomb_3x3_odd";
             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";
@@ -166,11 +136,9 @@ 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;
@@ -181,14 +149,6 @@ group { "elm/layout/gallery_image_grid/linear";
             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;
@@ -213,7 +173,7 @@ group { "elm/layout/gallery_image_grid/linear";
          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";
@@ -221,7 +181,7 @@ group { "elm/layout/gallery_image_grid/linear";
          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";
@@ -229,7 +189,7 @@ group { "elm/layout/gallery_image_grid/linear";
          action: STATE_SET "default";
          transition: DECELERATE 0.3;
          target: "spacer";
-         target: "image_mask_0";
+         target: "swallow.cell_0";
          after: "transition_finished";
       }
       program { "transition_finished";
index beaa6d78190e5e9893c244ca63fe0739eea2df5c..45de1f4b13fde362b251c8dec81d5667b87490a6 100644 (file)
@@ -48,7 +48,6 @@ namespace gallery { namespace { namespace impl {
                        {"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"};
@@ -129,6 +128,7 @@ namespace gallery {
        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;
@@ -148,10 +148,12 @@ namespace gallery {
 
                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)
@@ -192,9 +194,10 @@ namespace gallery {
                }
 
                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)
                {
                }
@@ -221,8 +224,9 @@ namespace gallery {
                        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)
                {
                }
        };
@@ -242,7 +246,7 @@ namespace gallery {
                                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);
@@ -714,13 +718,15 @@ namespace gallery {
                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;
                        }
                }