TizenRefApp-8357 [Gallery] Implement SelectMode style for linear ImageGrid 35/124535/3
authorIgor Nazarov <i.nazarov@samsung.com>
Tue, 11 Apr 2017 13:10:31 +0000 (16:10 +0300)
committerIgor Nazarov <i.nazarov@samsung.com>
Tue, 11 Apr 2017 13:34:05 +0000 (16:34 +0300)
type

- Implemented select mode support for "elm/layout/gallery_image_grid/linear"
  layout theme.

Change-Id: Ibedee303d0a5769071fe6d10b9ae5654613a2f83

edc/colors.h
edc/image-grid.edc
edc/images/gallery_thumbnail_select_ring_1x1.png [new file with mode: 0644]

index 5b75cd7050b2adc669110c87524346cf2c30645a..0566ba89395ee66a12ee9091b4668a4d534dc4d9 100644 (file)
 #define GALLERY_COLOR_AO0112P 0 0 0 102
 #define GALLERY_COLOR_AO0112D 0 0 0 77
 
+#define GALLERY_COLOR_AO032 77 207 255 255
+
 #define GALLERY_COLOR_IMG_EF_NORMAL GALLERY_COLOR_AO0112
 #define GALLERY_COLOR_IMG_EF_PRESSED GALLERY_COLOR_AO0112P
 #define GALLERY_COLOR_IMG_EF_DISABLED GALLERY_COLOR_AO0112D
 
+#define GALLERY_COLOR_SELECT_RING GALLERY_COLOR_AO032
+
 #endif // __GALLERY_EDC_COLORS_H__
index 751509edd37979761bece0f34eeb489dcaa6fc50..81ce69dc552b64d8d1f3b91464de7854a5d04986 100644 (file)
@@ -17,6 +17,7 @@
 images {
    image: "gallery_thumbnail_circle_04.png" COMP;
    image: "gallery_circle_basic.png" COMP;
+   image: "gallery_thumbnail_select_ring_1x1.png" COMP;
 }
 group { "elm/layout/gallery_image_grid/hcomb_3x3_even";
    parts {
@@ -149,15 +150,32 @@ group { "elm/layout/gallery_image_grid/hcomb_3x3_odd";
 }
 group { "elm/layout/gallery_image_grid/linear";
    parts {
-      image { "image_mask_0";
+      spacer { "spacer";
          scale;
+         desc { "default";
+            fixed: 0 1;
+            min: 360 360;
+            max: 360 360;
+         }
+         desc { "select_mode";
+            inherit: "default";
+            min: (25 + 216) (25 + 216);
+            max: (25 + 216) (25 + 216);
+         }
+      }
+      image { "image_mask_0";
          precise;
          desc { "default";
             image.normal: "gallery_circle_basic.png";
-            fixed: 0 1;
+            fixed: 1 1;
             min: 360 360;
             max: 360 360;
          }
+         desc { "select_mode";
+            inherit: "default";
+            min: (216 + 4) (216 + 4);
+            max: (216 + 4) (216 + 4);
+         }
       }
       swallow { "swallow.cell_0";
          desc { "default";
@@ -167,5 +185,56 @@ group { "elm/layout/gallery_image_grid/linear";
             rel2.to: "image_mask_0";
          }
       }
+      image { "select_ring_0";
+         repeat;
+         desc { "default";
+            hid;
+            image.normal: "gallery_thumbnail_select_ring_1x1.png";
+            color: GALLERY_COLOR_SELECT_RING;
+            fixed: 1 1;
+            min: 266 266;
+            max: 266 266;
+         }
+         desc { "selected";
+            inherit: "default";
+            vis;
+         }
+      }
+   }
+   programs {
+      program { "gallery,enable,select,mode";
+         signal: "gallery,enable,select,mode";
+         source: "";
+         action: STATE_SET "select_mode";
+         transition: DECELERATE 0.3;
+         target: "spacer";
+         target: "image_mask_0";
+         after: "transition_finished";
+      }
+      program { "gallery,disable,select,mode";
+         signal: "gallery,disable,select,mode";
+         source: "";
+         action: STATE_SET "default";
+         transition: DECELERATE 0.3;
+         target: "spacer";
+         target: "image_mask_0";
+         after: "transition_finished";
+      }
+      program { "transition_finished";
+         in: 0.001 0.0;
+         action: SIGNAL_EMIT "gallery,transition,finished" "";
+      }
+      program { "gallery,select,0";
+         signal: "gallery,select,0";
+         source: "";
+         action: STATE_SET "selected";
+         target: "select_ring_0";
+      }
+      program { "gallery,unselect,0";
+         signal: "gallery,unselect,0";
+         source: "";
+         action: STATE_SET "default";
+         target: "select_ring_0";
+      }
    }
 }
diff --git a/edc/images/gallery_thumbnail_select_ring_1x1.png b/edc/images/gallery_thumbnail_select_ring_1x1.png
new file mode 100644 (file)
index 0000000..95cf934
Binary files /dev/null and b/edc/images/gallery_thumbnail_select_ring_1x1.png differ