protected override IntPtr CreateHandle(EvasObject parent)
{
- //TODO: Fix this to use layout
- return Interop.Elementary.elm_button_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_button_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
Interop.Elementary.elm_entry_select_none(RealHandle);
}
+ public override void SetPartColor(string part, Color color)
+ {
+ IntPtr handle = (part == "bg") ? Handle : RealHandle;
+ Interop.Elementary.elm_object_color_class_color_set(handle, part, color.R * color.A / 255,
+ color.G * color.A / 255,
+ color.B * color.A / 255,
+ color.A);
+ }
+
protected override IntPtr CreateHandle(EvasObject parent)
{
- //TODO: Fix this to use layout
- return Interop.Elementary.elm_entry_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "background", "default");
+
+
+ RealHandle = Interop.Elementary.elm_entry_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
*/
using System;
-
namespace ElmSharp
{
/// <summary>
set
{
Interop.Elementary.elm_label_line_wrap_set(RealHandle, (int)value);
+ if (value != WrapType.None)
+ {
+ Interop.Evas.evas_object_size_hint_min_get(RealHandle, IntPtr.Zero, out int h);
+ Interop.Evas.evas_object_size_hint_min_set(RealHandle, 0, h);
+ }
}
}
/// <returns>The new object, otherwise null if it cannot be created</returns>
protected override IntPtr CreateHandle(EvasObject parent)
{
- //TODO: Fix this to use layout
- return Interop.Elementary.elm_label_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_label_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}