Elementary entry: Added mixedwrap theme groups and use them.
authorTom Hacohen <tom@stosb.com>
Mon, 2 May 2011 11:08:35 +0000 (11:08 +0000)
committerTom Hacohen <tom@stosb.com>
Mon, 2 May 2011 11:08:35 +0000 (11:08 +0000)
SVN revision: 59116

data/themes/default.edc
src/lib/elm_entry.c

index 5968c51..4a3a305 100644 (file)
@@ -8388,6 +8388,83 @@ collections {
       }
    }
 
+   group { name: "elm/entry/base-mixedwrap/default";
+      styles
+      {
+         style { name: "entry_textblock_style_mixedwrap";
+            base: "font=Sans font_size=10 color=#000 wrap=mixed text_class=entry";
+            tag:  "br" "\n";
+            tag:  "ps" "ps";
+            tag:  "tab" "\t";
+            tag:  "em" "+ font=Sans:style=Oblique";
+            tag:  "b" "+ font=Sans:style=Bold";
+            tag:  "link" "+ color=#800 underline=on underline_color=#8008";
+            tag:  "hilight" "+ font=Sans:style=Bold";
+         }
+         style { name: "entry_textblock_disabled_style_mixedwrap";
+            base: "font=Sans font_size=10 color=#00000080 wrap=char text_class=entry";
+            tag:  "br" "\n";
+            tag:  "ps" "ps";
+            tag:  "tab" "\t";
+            tag:  "em" "+ font=Sans:style=Oblique";
+            tag:  "b" "+ font=Sans:style=Bold";
+            tag:  "link" "+ color=#00000080 underline=on underline_color=#00000080";
+            tag:  "hilight" "+ font=Sans:style=Bold";
+         }
+      }
+      parts {
+         part { name: "elm.text";
+            type: TEXTBLOCK;
+            mouse_events: 1;
+            scale: 1;
+            entry_mode: EDITABLE;
+            select_mode: EXPLICIT;
+            multiline: 1;
+            source: "elm/entry/selection/default"; // selection under
+//          source2: "X"; // selection over
+//          source3: "X"; // cursor under
+            source4: "elm/entry/cursor/default"; // cursorover
+            source5: "elm/entry/anchor/default"; // anchor under
+//          source6: "X"; // anchor over
+            description { state: "default" 0.0;
+               fixed: 1 0;
+               text {
+                  style: "entry_textblock_style_mixedwrap";
+                  min: 0 1;
+                  align: 0.0 0.0;
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               text {
+                  style: "entry_textblock_disabled_style_mixedwrap";
+                  min: 0 1;
+               }
+            }
+         }
+      }
+      programs {
+         program { name: "focus";
+            signal: "load";
+            source: "";
+            action: FOCUS_SET;
+            target: "elm.text";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "elm.text";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
+
    group { name: "elm/entry/base-charwrap/default";
       styles
       {
@@ -8716,6 +8793,55 @@ collections {
       }
    }
 
+   group { name: "elm/entry/base-noedit-mixedwrap/default";
+      parts {
+         part { name: "elm.text";
+            type: TEXTBLOCK;
+            mouse_events: 1;
+            scale: 1;
+            entry_mode: PLAIN;
+            select_mode: EXPLICIT;
+            multiline: 1;
+            source: "elm/entry/selection/default"; // selection under
+            source5: "elm/entry/anchor/default"; // anchor under
+            description { state: "default" 0.0;
+               fixed: 1 0;
+               text {
+                  style: "entry_textblock_style_mixedwrap";
+                  min: 0 1;
+                  align: 0.0 0.0;
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               text {
+                  style: "entry_textblock_disabled_style_mixedwrap";
+               }
+            }
+         }
+      }
+      programs {
+         program { name: "focus";
+            signal: "load";
+            source: "";
+            action: FOCUS_SET;
+            target: "elm.text";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "elm.text";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
+
    group { name: "elm/entry/base-noedit-charwrap/default";
       parts {
          part { name: "elm.text";
index 4635ceb..8589074 100644 (file)
@@ -1087,9 +1087,9 @@ _getbase(Evas_Object *obj)
                      case ELM_WRAP_CHAR:
                         return "base-charwrap";
                      case ELM_WRAP_WORD:
-                     case ELM_WRAP_MIXED:
-                        /* FIXME: separate mixed and word. */
                         return "base";
+                     case ELM_WRAP_MIXED:
+                        return "base-mixedwrap";
                      case ELM_WRAP_NONE:
                      default:
                         return "base-nowrap";
@@ -1110,9 +1110,9 @@ _getbase(Evas_Object *obj)
                      case ELM_WRAP_CHAR:
                         return "base-noedit-charwrap";
                      case ELM_WRAP_WORD:
-                     case ELM_WRAP_MIXED:
-                        /* FIXME: separate mixed and word. */
                         return "base-noedit";
+                     case ELM_WRAP_MIXED:
+                        return "base-noedit-mixedwrap";
                      case ELM_WRAP_NONE:
                      default:
                         return "base-nowrap-noedit";