Hi,
The patch was nice, but it is not usual to see, in default theme,
transparent widgets when disabled. I changed the transparent slider to
a gray slider. I am sending the patch attached. The other patch is to
fix bugs in the slider red bar.

For non git users, the image can be found in
http://people.profusion.mobi/~otavio/slider/sl_bt_3.png

If it is ok, let me know so i can commit it.

Otavio Pontes


On Tue, Dec 7, 2010 at 3:14 AM, Carsten Haitzler <ras...@rasterman.com> wrote:
> On Mon, 06 Dec 2010 09:23:26 +0900 Jihoon Kim <jihoon48....@samsung.com> said:
>
> in svn! :)
>
>> Hello, all.
>>
>>
>>
>> elm_slider does not support disable state, so I make this patch.
>>
>> Please review it and upload in svn if it is ok.
>>
>> Thanks.
>>
>
>
> --
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    ras...@rasterman.com
>
>
> ------------------------------------------------------------------------------
> What happens now with your Lotus Notes apps - do you make another costly
> upgrade, or settle for being marooned without product support? Time to move
> off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
> use, and manage than apps on traditional platforms. Sign up for the Lotus
> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Otavio Pontes
ProFUSION embedded systems
http://www.profusion.mobi
From 247b17aff5eae2db47db03dd7b3f86ba56b3bbb7 Mon Sep 17 00:00:00 2001
From: Otavio Pontes <ota...@profusion.mobi>
Date: Tue, 7 Dec 2010 14:06:01 -0200
Subject: [PATCH 1/2] Fixing problems in disabled slider
To: ota...@profusion.mobi

---
 data/themes/default.edc |   49 ++++++++++++++++++++++++++++++++++++++++++----
 src/bin/test_slider.c   |    2 +
 2 files changed, 46 insertions(+), 5 deletions(-)

diff --git a/data/themes/default.edc b/data/themes/default.edc
index c5b928f..6d15086 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -13722,6 +13722,14 @@ collections {
                inherit: "default" 0.0;
                visible: 0;
             }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               color: 255 0 0 100;
+            }
+            description { state: "disabled_inverted" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+            }
          }
          part { name: "level2";
             type: RECT;
@@ -13743,7 +13751,6 @@ collections {
             }
             description { state: "disabled" 0.0;
                inherit: "default" 0.0;
-               color: 255 0 0 100;
             }
             description { state: "disabled_inverted" 0.0;
                inherit: "default" 0.0;
@@ -14327,9 +14334,15 @@ collections {
 
                get_state(PART:"level2", st, 30, vl);
                if (!strcmp(st, "inverted")) 
+               {
+                  set_state(PART:"level", "disabled_inverted", 0.0);
                   set_state(PART:"level2", "disabled_inverted", 0.0);
+               }
                else 
+               {
+                  set_state(PART:"level", "disabled", 0.0);
                   set_state(PART:"level2", "disabled", 0.0);
+               }
             }
          }
          program { name: "enable";
@@ -14357,10 +14370,16 @@ collections {
                   set_state(PART:"elm.units", "default", 0.0);
      
                get_state(PART:"level2", st, 30, vl);
-               if (!strcmp(st, "visible"))
-                  set_state(PART:"level2", "visible", 0.0);
+               if (!strcmp(st, "disabled_inverted"))
+               {
+                  set_state(PART:"level", "inverted", 0.0);
+                  set_state(PART:"level2", "inverted", 0.0);
+               }
                else
+               {
+                  set_state(PART:"level", "default", 0.0);
                   set_state(PART:"level2", "default", 0.0);
+               }
             }
          }
       }
@@ -14449,6 +14468,14 @@ collections {
                inherit: "default" 0.0;
                visible: 0;
             }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               color: 255 0 0 100;
+            }
+            description { state: "disabled_inverted" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+            }
          }
          part { name: "level2";
             type: RECT;
@@ -15057,9 +15084,15 @@ collections {
 
 	       get_state(PART:"level2", st, 30, vl);
 	       if (!strcmp(st, "inverted")) 
+               {
+	          set_state(PART:"level", "disabled_inverted", 0.0);
 	          set_state(PART:"level2", "disabled_inverted", 0.0);
+               }
 	       else 
+               {
+	          set_state(PART:"level", "disabled", 0.0);
 	          set_state(PART:"level2", "disabled", 0.0);
+               }
 	    }
 	 }
 
@@ -15088,10 +15121,16 @@ collections {
 	          set_state(PART:"elm.units", "default", 0.0);
      
 	       get_state(PART:"level2", st, 30, vl);
-	       if (!strcmp(st, "visible"))
-	          set_state(PART:"level2", "visible", 0.0);
+	       if (!strcmp(st, "disabled_inverted"))
+               {
+	          set_state(PART:"level", "inverted", 0.0);
+	          set_state(PART:"level2", "inverted", 0.0);
+               }
 	       else
+               {
+	          set_state(PART:"level", "default", 0.0);
 	          set_state(PART:"level2", "default", 0.0);
+               }
 	    }
 	 }
       }
diff --git a/src/bin/test_slider.c b/src/bin/test_slider.c
index 67d5a17..6488cda 100644
--- a/src/bin/test_slider.c
+++ b/src/bin/test_slider.c
@@ -59,6 +59,8 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    elm_slider_icon_set(sl, ic);
    elm_slider_unit_format_set(sl, "%1.1f units");
    elm_slider_span_size_set(sl, 120);
+   elm_slider_min_max_set(sl, 50, 150);
+   elm_slider_value_set(sl, 80);
    elm_object_disabled_set(sl, EINA_TRUE);
    evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
    evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-- 
1.7.3.2

From 986a683e8cfef15bb6451c5d2e6bc1033751f683 Mon Sep 17 00:00:00 2001
From: Otavio Pontes <ota...@profusion.mobi>
Date: Tue, 7 Dec 2010 14:23:57 -0200
Subject: [PATCH 2/2] Slider gets gray instead of reducing alpha when it is disabled.
To: ota...@profusion.mobi

---
 data/themes/default.edc |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/data/themes/default.edc b/data/themes/default.edc
index 6d15086..284478c 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -13648,6 +13648,7 @@ collections {
 	 image: "sl_bt_0.png" COMP;
 	 image: "sl_bt_1.png" COMP;
 	 image: "sl_bt_2.png" COMP;
+	 image: "sl_bt_3.png" COMP;
 	 image: "sl_bt2_0_0.png" COMP;
 	 image: "sl_bt2_0_1.png" COMP;
 	 image: "sl_bt2_0_2.png" COMP;
@@ -14015,8 +14016,11 @@ collections {
             }
             description { state: "disabled" 0.0;
                inherit: "default" 0.0;
-               color: 128 128 128 128;
-			}
+               image {
+                  normal: "sl_bt_3.png";
+                  border: 5 5 5 10;
+               }
+            }
          }
          part { name: "button1";
             mouse_events: 0;
@@ -14393,6 +14397,7 @@ collections {
 	 image: "sl_bt_0.png" COMP;
 	 image: "sl_bt_1.png" COMP;
 	 image: "sl_bt_2.png" COMP;
+	 image: "sl_bt_3.png" COMP;
 	 image: "sl_bt2_0_0.png" COMP;
 	 image: "sl_bt2_0_1.png" COMP;
 	 image: "sl_bt2_0_2.png" COMP;
@@ -14766,8 +14771,11 @@ collections {
             }
             description { state: "disabled" 0.0;
                inherit: "default" 0.0;
-               color: 128 128 128 128;
-	        }
+               image {
+                  normal: "sl_bt_3.png";
+                  border: 5 5 5 10;
+               }
+            }
          }
          part { name: "button1";
             mouse_events: 0;
-- 
1.7.3.2

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to