From: Kim Shinwoo <kimcinoo.efl@gmail.com>
authorKim Shinwoo <kimcinoo.efl@gmail.com>
Mon, 3 Sep 2012 09:26:57 +0000 (09:26 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Mon, 3 Sep 2012 09:26:57 +0000 (09:26 +0000)
Subject: [E-devel] [patch][elementary] popup - smart theme

popup have used notify its internal widget. but popup does not take care
the notify theme in its smart_theme()
the attachment just add a line to set style to the notify and test code
also. please review and give feedback. thanks.

SVN revision: 75987

ChangeLog
NEWS
data/themes/widgets/popup.edc
src/bin/test_popup.c
src/lib/elc_popup.c

index f7228a8..2f532cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2012-09-03  Shinwoo Kim (kimcinoo)
 
         * Add in more access subsystem features like activation cb.
+        * Fix popup to apply the same style to the notify sub-widget.
diff --git a/NEWS b/NEWS
index 5702ee0..3b533f0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@ Fixes:
 
    * Now elm_datetime_field_limit_set() can set year limits wihtout problems.
    * Fix re-order animation when it doesn't end correctly.
+   * Fix popup to apply the same style to the notify sub-widget.
    
 Removals:
 
index aca9f9d..2bb382a 100644 (file)
@@ -20,6 +20,41 @@ group { name: "elm/notify/block_events/popup";
    }
 }
 
+group { name: "elm/notify/block_events/transparent";
+   parts {
+      part { name: "block_events";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+         description { state: "clicked" 0.0;
+            color: 0 0 0 50;
+         }
+      }
+   }
+   programs {
+      program { name: "block_clicked";
+         signal: "mouse,clicked,1";
+         source: "block_events";
+         action: SIGNAL_EMIT "elm,action,click" "elm";
+         after: "deeper_block_color";
+      }
+      program {
+         name: "deeper_block_color";
+         action: STATE_SET "clicked" 0.0;
+         target: "block_events";
+         transition: LINEAR 0.2;
+         after: "default_block_color";
+      }
+      program {
+         name: "default_block_color";
+         action: STATE_SET "default" 0.0;
+         target: "block_events";
+         transition: LINEAR 0.2;
+      }
+   }
+}
+
 group { name: "elm/label/base/popup/default";
    styles
      {
index 0c68316..f5be1b8 100644 (file)
@@ -305,6 +305,24 @@ _popup_center_text_1button_hide_show_cb(void *data, Evas_Object *obj __UNUSED__,
    evas_object_show(g_popup);
 }
 
+static void
+_popup_transparent_cb(void *data, Evas_Object *obj __UNUSED__,
+                      void *event_info __UNUSED__)
+{
+   Evas_Object *popup;
+   Evas_Object *btn;
+
+   popup = elm_popup_add(data);
+   elm_object_style_set(popup, "transparent");
+   evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_object_text_set(popup, "This Popup has transparent background");
+   btn = elm_button_add(popup);
+   elm_object_text_set(btn, "Close");
+   elm_object_part_content_set(popup, "button1", btn);
+   evas_object_smart_callback_add(btn, "clicked", _response_cb, popup);
+   evas_object_show(popup);
+}
+
 void
 test_popup(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
            void *event_info __UNUSED__)
@@ -341,6 +359,8 @@ test_popup(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
                         _popup_center_title_text_2button_restack_cb, win);
    elm_list_item_append(list, "popup-center-text + 1 button (check hide, show)", NULL, NULL,
                         _popup_center_text_1button_hide_show_cb, win);
+   elm_list_item_append(list, "popup-transparent", NULL, NULL,
+                        _popup_transparent_cb, win);
    elm_list_go(list);
    evas_object_show(list);
    evas_object_show(win);
index 3de0781..1a49e55 100644 (file)
@@ -220,6 +220,8 @@ _elm_popup_smart_theme(Evas_Object *obj)
 
    _mirrored_set(obj, elm_widget_mirrored_get(obj));
 
+   elm_object_style_set(sd->notify, elm_widget_style_get(obj));
+
    if (sd->button_count)
      {
         snprintf(buf, sizeof(buf), "buttons%u", sd->button_count);