rimmed pushed a commit to branch eflete-1.18.

http://git.enlightenment.org/tools/eflete.git/commit/?id=f304bb4c944f1ef68da657b80630676fe543e598

commit f304bb4c944f1ef68da657b80630676fe543e598
Author: Mykyta Biliavskyi <m.biliavs...@samsung.com>
Date:   Wed Aug 31 15:04:29 2016 +0300

    Tizen theme: update style and sizes for colorselector.
    
    Added dirty hack to resize color picker.
---
 data/themes/tizen/widgets/colorselector.edc | 69 +++++++++++++----------------
 src/bin/ui/popup.c                          |  9 ++++
 src/bin/ui/property/property_common.c       | 10 ++++-
 3 files changed, 48 insertions(+), 40 deletions(-)

diff --git a/data/themes/tizen/widgets/colorselector.edc 
b/data/themes/tizen/widgets/colorselector.edc
index 27d4ae7..6d118f6 100644
--- a/data/themes/tizen/widgets/colorselector.edc
+++ b/data/themes/tizen/widgets/colorselector.edc
@@ -12,8 +12,8 @@ group { name: "elm/layout/popup/colorselector";
       part { name: "border";
          type: RECT;
          description { state: "default" 0.0;
-            min: 404 263;
-            max: 404 263;
+            min: 351 258;
+            max: 351 258;
             color_class: "popup_helper_border";
             rel1.offset: -1 -1;
             rel2.offset: 0 0;
@@ -552,23 +552,24 @@ group { name: "elm/colorselector/picker/default";
       }
    }
 }
+
 group { name: "elm/colorselector/palette/default";
    data {
-      item: "vertical_pad" "8";
-      item: "horizontal_pad" "8";
+      item: "vertical_pad" "0";
+      item: "horizontal_pad" "7";
    }
    parts {
       part { name: "bg_border";
          type: RECT;
-         description { state: "default" 0.0;
-            min: 402 261;
-            max: 402 261;
+         description { state: "default" 0.00;
+            min: 349 256;
+            max: 349 256;
             color_class: "colorselector_border_bg";
          }
       }
       part { name: "bg";
          type: RECT;
-         description { state: "default" 0.0;
+         description { state: "default" 0.00;
             color_class: "colorselector_bg";
             rel1 {
                offset: 5 5;
@@ -582,13 +583,13 @@ group { name: "elm/colorselector/palette/default";
       }
       part { name: "elm.picker";
          type: SWALLOW;
-         description { state: "default" 0.0;
-            align: 0.0 0.0;
+         description { state: "default" 0.00;
+            align: 0.00 0.00;
             fixed: 1 1;
             min: 96 169;
             max: 96 169;
             rel1 {
-               relative: 1.0 0.0;
+               relative: 1.00 0.00;
                offset: 16 25;
                to_x: "elm.selector";
                to_y: "bg_border";
@@ -601,13 +602,13 @@ group { name: "elm/colorselector/palette/default";
       }
       part { name: "elm.palette";
          type: SWALLOW;
-         description { state: "default" 0.0;
-            align: 0.5 0.0;
+         description { state: "default" 0.00;
+            align: 0.50 0.00;
             fixed: 1 1;
-            min: 0 32;
-            max: -1 32;
+            min: 0 27;
+            max: -1 27;
             rel1 {
-               relative: 0.0 1.0;
+               relative: 0.00 1.00;
                offset: 0 10;
                to: "elm.selector";
             }
@@ -617,19 +618,19 @@ group { name: "elm/colorselector/palette/default";
                to_y: "elm.selector";
             }
          }
-         description { state: "off" 0.0;
-            align: 0.5 0.0;
-            rel1.relative: 0.0 1.0;
-            rel2.relative: 1.0 0.0;
+         description { state: "off" 0.00;
+            align: 0.50 0.00;
+            rel1.relative: 0.00 1.00;
+            rel2.relative: 1.00 0.00;
          }
       }
       part { name: "elm.selector";
          type: SWALLOW;
-         description { state: "default" 0.0;
-            align: 0.0 0.0;
+         description { state: "default" 0.00;
+            align: 0.00 0.00;
             fixed: 1 1;
-            min: 240 159;
-            max: 240 159;
+            min: 188 159;
+            max: 188 159;
             rel1 {
                offset: 25 34;
                to: "bg_border";
@@ -922,29 +923,19 @@ group { name: "elm/colorselector/picker/base/default";
 }
 group { name: "elm/colorselector/item/default";
    parts {
-      part { name: "base";
-         type: RECT;
-         description { state: "default" 0.0;
-            visible: 0;
-            min: 27 28;
-            max: 27 28;
-         }
-      }
-      part { name: "bg";
+     part { name: "bg";
          type: RECT;
          description { state: "default" 0.0;
-            min: 32 32;
-            max: 32 32;
-            align: 0.0 0.5;
-            color: 0 0 0 0;
+            min: 27 27;
+            max: 27 27;
          }
       }
       part { name: "color_obj";
          type: SWALLOW;
          clip_to: "clipper";
          description { state: "default" 0.0;
-            min: 32 32;
-            max: 32 32;
+            min: 27 27;
+            max: 27 27;
             rel1.to: "bg";
             rel2.to: "bg";
          }
diff --git a/src/bin/ui/popup.c b/src/bin/ui/popup.c
index 8bdcd5b..7630244 100644
--- a/src/bin/ui/popup.c
+++ b/src/bin/ui/popup.c
@@ -936,6 +936,15 @@ popup_colorselector_helper(Evas_Object *follow_up,
    evas_object_show(fs);
 
 #if HAVE_TIZEN
+   /* Dirty hack for set size to color picker */
+   Evas_Object *picker_base = elm_layout_content_get(fs, "elm.picker");
+   Evas_Object *picker_box = elm_layout_content_get(picker_base, 
"elm.swallow.picker");
+   Evas_Object *picker_layout = 
eina_list_data_get(elm_box_children_get(picker_box));
+   Evas_Object *picker_image = edje_object_part_swallow_get(picker_layout, 
"elm.picker");
+
+   evas_object_size_hint_aspect_set(picker_image, EVAS_ASPECT_CONTROL_NONE, 0, 
0);
+   evas_object_size_hint_min_set(picker_image, 96, 48);
+
    elm_colorselector_palette_clear(fs);
    elm_colorselector_palette_name_set(fs, "eflete_tizen");
    elm_colorselector_palette_color_add(fs, 229, 3, 3, 255);
diff --git a/src/bin/ui/property/property_common.c 
b/src/bin/ui/property/property_common.c
index 2044464..758636e 100644
--- a/src/bin/ui/property/property_common.c
+++ b/src/bin/ui/property/property_common.c
@@ -397,7 +397,15 @@ _control_create(Property_Attribute *pa, Property_Action 
*action, Evas_Object *pa
          evas_object_smart_callback_add(content, "color,item,selected", 
_start_change_stop_cb, pa);
 
 #if HAVE_TIZEN
-         evas_object_size_hint_min_set(content, 402, 261);
+         /* Dirty hack for set size to color picker */
+         Evas_Object *picker_base = elm_layout_content_get(content, 
"elm.picker");
+         Evas_Object *picker_box = elm_layout_content_get(picker_base, 
"elm.swallow.picker");
+         Evas_Object *picker_layout = 
eina_list_data_get(elm_box_children_get(picker_box));
+         Evas_Object *picker_image = 
edje_object_part_swallow_get(picker_layout, "elm.picker");
+         evas_object_size_hint_aspect_set(picker_image, 
EVAS_ASPECT_CONTROL_NONE, 0, 0);
+         evas_object_size_hint_min_set(picker_image, 96, 48);
+
+         evas_object_size_hint_min_set(content, 349, 256);
          elm_colorselector_palette_clear(content);
          elm_colorselector_palette_name_set(content, "eflete_tizen");
          elm_colorselector_palette_color_add(content, 229, 3, 3, 255);

-- 


Reply via email to