rimmed pushed a commit to branch master.

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

commit ab2b4814603cf447157d9e59c25dc732337d43e5
Author: Mykola Solyanko <m.solya...@samsung.com>
Date:   Thu Nov 5 10:34:58 2015 +0200

    workspace: implement bottom panel
---
 data/images/crop.png                     | Bin 0 -> 3208 bytes
 data/images/scale-larger.png             | Bin 0 -> 3169 bytes
 data/images/scale-smaller.png            | Bin 0 -> 3089 bytes
 data/themes/default/widgets/scroller.edc |  19 ++++-
 src/bin/ui/workspace/workspace.c         | 127 +++++++++++++++++++++++++++++++
 5 files changed, 144 insertions(+), 2 deletions(-)

diff --git a/data/images/crop.png b/data/images/crop.png
new file mode 100644
index 0000000..40e5f4a
Binary files /dev/null and b/data/images/crop.png differ
diff --git a/data/images/scale-larger.png b/data/images/scale-larger.png
new file mode 100644
index 0000000..2ecdcf8
Binary files /dev/null and b/data/images/scale-larger.png differ
diff --git a/data/images/scale-smaller.png b/data/images/scale-smaller.png
new file mode 100644
index 0000000..7b980bb
Binary files /dev/null and b/data/images/scale-smaller.png differ
diff --git a/data/themes/default/widgets/scroller.edc 
b/data/themes/default/widgets/scroller.edc
index a857571..b91b795 100644
--- a/data/themes/default/widgets/scroller.edc
+++ b/data/themes/default/widgets/scroller.edc
@@ -587,6 +587,10 @@ group { name: "elm/scroller/base/workspace";
                to: "elm.swallow.button";
                relative: 1.0 1.0;
             }
+            rel2 {
+               to: "bottom_panel";
+               relative: 1.0 0.0;
+            }
          }
       }
       part { name: "clipper_hrul";
@@ -683,7 +687,8 @@ group { name: "elm/scroller/base/workspace";
             align: 0.0 0.5;
             rel2 {
                to_x: "area.button";
-               to_y: "base";
+               to_y: "bottom_panel";
+               relative: 1.0 0.0;
             }
          }
       }
@@ -703,7 +708,8 @@ group { name: "elm/scroller/base/workspace";
             }
             rel2 {
                to_x: "area.button";
-               to_y: "base";
+               to_y: "bottom_panel";
+               relative: 1.0 0.0;
             }
          }
          description { state: "hidden" 0.0;
@@ -712,6 +718,15 @@ group { name: "elm/scroller/base/workspace";
             visible: 0;
          }
       }
+      part { name: "bottom_panel";
+         type: SWALLOW;
+         description { state: "default" 0.0;
+            fixed: 0 1;
+            max: -1 32;
+            align: 0.0 1.0;
+            visible: 1;
+         }
+      }
    }
    programs {
       program {
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index af8e160..001e62e 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -951,6 +951,130 @@ _workspace_smart_add(Evas_Object *o)
    _workspace_parent_sc->add(o);
 }
 
+static void
+_zoom_part_add(Evas_Object *parent)
+{
+   Evas_Object *image, *slider_zoom;
+   Evas_Object *button_resize, *button_zoom;
+
+   button_resize = elm_button_add(parent);
+   elm_box_pack_end(parent, button_resize);
+   evas_object_show(button_resize);
+
+   button_zoom = elm_button_add(parent);
+   elm_box_pack_end(parent, button_zoom);
+   evas_object_show(button_zoom);
+
+   slider_zoom = elm_slider_add(parent);
+   image = elm_image_add(parent);
+   elm_image_file_set(image, EFLETE_IMG_PATH"scale-smaller.png", NULL);
+   elm_object_part_content_set(slider_zoom, "elm.swallow.icon", image);
+
+   image = elm_image_add(parent);
+   elm_image_file_set(image, EFLETE_IMG_PATH"scale-larger.png", NULL);
+   elm_object_part_content_set(slider_zoom, "elm.swallow.end", image);
+   elm_box_pack_end(parent, slider_zoom);
+   evas_object_show(slider_zoom);
+}
+
+static void
+_mode_part_add(Evas_Object *parent)
+{
+   Evas_Object *radio_mode, *radio_group;
+
+   radio_group = radio_mode = elm_radio_add(parent);
+   elm_radio_state_value_set(radio_mode, 1);
+   elm_box_pack_end(parent, radio_mode);
+   evas_object_show(radio_mode);
+
+   radio_mode = elm_radio_add(parent);
+   elm_radio_state_value_set(radio_mode, 2);
+   elm_box_pack_end(parent, radio_mode);
+   evas_object_show(radio_mode);
+   elm_radio_group_add(radio_mode, radio_group);
+
+   radio_mode = elm_radio_add(parent);
+   elm_radio_state_value_set(radio_mode, 3);
+   elm_box_pack_end(parent, radio_mode);
+   evas_object_show(radio_mode);
+   elm_radio_group_add(radio_mode, radio_group);
+
+   radio_mode = elm_radio_add(parent);
+   elm_radio_state_value_set(radio_mode, 4);
+   elm_box_pack_end(parent, radio_mode);
+   evas_object_show(radio_mode);
+   elm_radio_group_add(radio_mode, radio_group);
+
+   radio_mode = elm_radio_add(parent);
+   elm_radio_state_value_set(radio_mode, 5);
+   elm_box_pack_end(parent, radio_mode);
+   evas_object_show(radio_mode);
+   elm_radio_group_add(radio_mode, radio_group);
+}
+
+static void
+_resize_part_add(Evas_Object *parent)
+{
+   Evas_Object *check_binding, *image;
+   Evas_Object *spinner_widght, *spinner_height, *check_size_chanage;
+
+   image = elm_image_add(parent);
+   elm_image_resizable_set(image, EINA_TRUE, EINA_FALSE);
+   elm_image_aspect_fixed_set(image, EINA_TRUE);
+   elm_image_file_set(image, EFLETE_IMG_PATH"crop.png", NULL);
+   elm_box_pack_end(parent, image);
+   evas_object_show(image);
+
+   spinner_widght = elm_spinner_add(parent);
+   elm_box_pack_end(parent, spinner_widght);
+   evas_object_show(spinner_widght);
+
+   check_binding = elm_check_add(parent);
+   elm_box_pack_end(parent, check_binding);
+   evas_object_show(check_binding);
+
+   spinner_height = elm_spinner_add(parent);
+   elm_box_pack_end(parent, spinner_height);
+   evas_object_show(spinner_height);
+
+   check_size_chanage = elm_check_add(parent);
+   elm_box_pack_end(parent, check_size_chanage);
+   evas_object_show(check_size_chanage);
+}
+
+static void
+_bottom_panel_add(Evas_Object *parent)
+{
+
+#define SEPARATOR_ADD() \
+   separator = elm_separator_add(box); \
+   elm_box_pack_end(box, separator); \
+   evas_object_show(separator);
+
+   Evas_Object *box, *separator;
+
+   box = elm_box_add(parent);
+   elm_box_align_set(box, 0.0, 0.5);
+   elm_box_horizontal_set(box, true);
+   elm_box_padding_set(box, 6, 0);
+   elm_object_part_content_set(parent, "bottom_panel", box);
+   evas_object_show(box);
+
+   _zoom_part_add(box);
+
+   SEPARATOR_ADD()
+
+   _mode_part_add(box);
+
+   SEPARATOR_ADD()
+
+   _resize_part_add(box);
+
+   SEPARATOR_ADD()
+
+#undef SEPARATOR_ADD
+}
+
 static Eina_Bool
 _workspace_child_create(Evas_Object *o, Evas_Object *parent)
 {
@@ -1025,6 +1149,9 @@ _workspace_child_create(Evas_Object *o, Evas_Object 
*parent)
    elm_object_part_content_set(priv->scroller, "elm.swallow.button",
                                priv->button_separate);
 
+   /* Add bottom panel to workspace */
+   _bottom_panel_add(priv->scroller);
+
    Evas_Object *edje = elm_layout_edje_get(priv->scroller);
    priv->clipper = (Evas_Object *) edje_object_part_object_get(edje, 
"clipper");
 

-- 


Reply via email to