Elementary entry: Added mixedwrap theme groups and use them.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 May 2011 11:08:35 +0000 (11:08 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 May 2011 11:08:35 +0000 (11:08 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@59116 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

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";