1. handle fixed size parts and mark them so edje doesnt complain, and dialog
authorCarsten Haitzler <raster@rasterman.com>
Mon, 19 Sep 2005 06:55:35 +0000 (06:55 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Mon, 19 Sep 2005 06:55:35 +0000 (06:55 +0000)
looks nicer now with icons in buttons (if desired)

SVN revision: 16762

data/themes/default_dialog.edc
data/themes/default_error.edc
data/themes/default_pager.edc
src/bin/e_dialog.c

index ea2cb8bec5e1ba565f097600b942d58e816383e4..f659080cda9085f3c2373346a210650ff7c8ebb6 100644 (file)
@@ -13,7 +13,7 @@ styles
       base: "font=Edje-Vera font_size=10 align=left color=#000 style=shadow shadow_color=#ffffff80 wrap=word";
       
       tag:  "br" "\n";
-      tag:  "hilight" "+ font_size=10 font=Edje-Vera-Bold style=glow color=#fff glow2_color=#fe87 glow_color=#fa14";
+      tag:  "hilight" "+ font=Edje-Vera-Bold style=glow color=#fff glow2_color=#fe87 glow_color=#fa14";
    }
 }
 
@@ -173,6 +173,7 @@ group {
            state: "default" 0.0;
            color: 0 0 0 0;
            align: 0.5 1.0;
+           fixed: 0 1;
            rel1 {
               relative: 0.0 1.0;
               offset:   16   -9;
@@ -210,6 +211,43 @@ group {
            }
         }
       }
+      part {
+        name: "icon_swallow";
+        type: SWALLOW;
+        description {
+           state: "default" 0.0;
+           align: 0.0 0.5;
+           color: 0 0 0 0;
+           rel1 {
+              relative: 0.0 0.0;
+              offset:   0  0;
+              to: "button_image";
+           }
+           rel2 {
+              relative: 0.0 1.0;
+              offset:   0  -7;
+              to: "button_image";
+           }
+        }
+        description {
+           state: "visible" 0.0;
+           inherit: "default" 0.0;
+           aspect: 1.0 1.0;
+           aspect_preference: VERTICAL;
+           align: 0.0 0.5;
+           color: 0 0 0 0;
+           rel1 {
+              relative: 0.0 0.0;
+              offset:   6  6;
+              to: "button_image";
+           }
+           rel2 {
+              relative: 0.0 1.0;
+              offset:   5   -7;
+              to: "button_image";
+           }
+        }
+      }
       part {
         name:          "button_text";
         type:          TEXT;
@@ -218,9 +256,10 @@ group {
         description {
            state:    "default" 0.0;
            rel1 {
-              relative: 0.0  0.0;
+              relative: 1.0  0.0;
               offset:   6    6;
-              to:     "button_image";
+              to_x:   "icon_swallow";
+              to_y:   "button_image";
            }
            rel2 {
               relative: 1.0  1.0;
@@ -233,7 +272,7 @@ group {
               text:     "OK";
               font:     "Edje-Vera";
               size:     10;
-              min:      0 0;
+              min:      1 1;
               align:    0.5 0.5;
            }
         }
@@ -260,6 +299,13 @@ group {
         source: "button_image";
         action: SIGNAL_EMIT "click" "";
       }
+      program {
+        name:   "icon_visible";
+        signal: "icon_visible";
+        source: "";
+        action: STATE_SET "visible" 0.0;
+        target: "icon_swallow";
+      }
    }
 }
 
index 76476cc5ba115159d421abea0e6b1946576c2e7d..553cd2a570356f04ea71f64fa230a12fe6de414a 100644 (file)
@@ -11,7 +11,7 @@ styles
       base: "font=Edje-Vera font_size=10 align=left color=#000 style=shadow shadow_color=#ffffff80 wrap=word";
       
       tag:  "br" "\n";
-      tag:  "hilight" "+ font_size=10 font=Edje-Vera-Bold style=glow color=#fff glow2_color=#fe87 glow_color=#fa14";
+      tag:  "hilight" "+ font=Edje-Vera-Bold style=glow color=#fff glow2_color=#fe87 glow_color=#fa14";
    }
 }
 
index ef8803b7ddff181e13038e4ccfced9a354fc4467..c7549abbedf25793c26af4721a61495671159127 100644 (file)
@@ -103,6 +103,7 @@ group {
         description {
            state: "default" 0.0;
            align: 0.5 0.0;
+           fixed: 0 1;
            rel1 {
               relative: 0.0 0.0;
               offset:  26 24;
index b7b62ad060e76cb5c5a2d000ecd280b13f644e9f..10ef3a599a783be358303ca9ca0e151369a27106 100644 (file)
@@ -106,7 +106,7 @@ e_dialog_button_add(E_Dialog *dia, char *label, char *icon, void (*func) (void *
    e_box_pack_end(dia->box_object, db->obj);
    e_box_pack_options_set(db->obj,
                          1, 1, /* fill */
-                         0, 1, /* expand */
+                         1, 1, /* expand */
                          0.5, 0.5, /* align */
                          mw, mh, /* min */
                          9999, mh /* max */