On Fri, 7 Oct 2011 14:16:58 -0700 "Ausmus, James" <[email protected]> said:

> On Fri, Oct 7, 2011 at 2:20 AM, Tom Hacohen <[email protected]> wrote:
> > I'm away from home/computers until Saturday evening (leaving now), I'll
> > take a look at it soon after.
> >
> > But I have a couple of questions until then:
> > What sizing do you get? what do you expect? The elm minimum height
> > should change according to the font size (unless it's smaller than the
> > finger size, which is then used).
> 
> It's taller than the part underneath it that it is set to be relative
> to and smaller than. However, I'm betting that the finger size thing
> is the issue here - any way to override/set the finger size
> dynamically, to be able to get around that limitation in one-off
> situations?

use a label then, not entry. an entry is there for the purpose of entering
text or selecting it etc. - not just display. thus it forces it to be at least
a finger size in height for single line entries (for multiple line its a bit
nastier so it doesn't currently). the whole point of finger size it to ensure a
person can reliably press on it. if you have a desktop app finger size should
be globally on your system set to something low - like "5". so you wont have a
problem. but elm is fixing the ui to make it usable for people. you don't need
your ui test department now to tell you to fix it anymore. :)

> Thanks!
> 
> -James
> 
> >
> > --
> > Tom.
> >
> > On 07/10/11 02:45, Ausmus, James wrote:
> >> Hi All-
> >>
> >> It appears that a standard Elementary entry widget has a minimum
> >> height that it refuses to size beneath, regardless of the font size
> >> being used, as demonstrated by the entry.c and entry.edc files below.
> >>
> >> Is there any way around this? How can I get a "short" Elm entry that
> >> actually obeys the size of the swallow - do I need to fully grok and
> >> recreate the default Elm theme for an entry in order to reduce the min
> >> height of it's visual components, or is there a (much) easier way? :)
> >>
> >> Thanks!
> >>
> >> -James
> >>
> >>
> >> /****************************************************************************/
> >> /*Begin entry.c */
> >> #include <stdio.h>
> >> #include <Elementary.h>
> >> #include <Edje.h>
> >>
> >> //UI signal callbacks
> >>
> >> static Evas_Object *ly;
> >>
> >> void main_quit_cb(void *data, Evas_Object *obj,
> >>                 const char *emission, const char *source)
> >> {
> >>         int x, y, h, w;
> >>         edje_object_part_geometry_get(elm_layout_edje_get(ly),
> >> "input_bg", &x, &y, &w, &h);
> >>         printf("after ibg geo: %i/%i, %i/%i\n", x, y, w, h);
> >>         edje_object_part_geometry_get(elm_layout_edje_get(ly),
> >> "input_swallow", &x, &y, &w, &h);
> >>         printf("after is geo: %i/%i, %i/%i\n", x, y, w, h);
> >>         elm_exit();
> >> }
> >>
> >> static Evas_Object* load_edj(Evas_Object *parent, const char *file,
> >>                 const char *group)
> >> {
> >>         Evas_Object *eo;
> >>         int r;
> >>
> >>         eo = elm_layout_add(parent);
> >>         if (eo) {
> >>                 r = elm_layout_file_set(eo, file, group);
> >>                 if (!r) {
> >>                         evas_object_del(eo);
> >>                         return NULL;
> >>                 }
> >>
> >>                 evas_object_size_hint_weight_set(eo,
> >>                                 EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
> >>         }
> >>         return eo;
> >> }
> >>
> >> int elm_main(int argc, char *argv[])
> >> {
> >>         Evas_Object *win = NULL;
> >>         Evas_Object *tb;
> >>         int nw, nh;
> >>
> >>         /* create window */
> >>         win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
> >>         if (win) {
> >>                 elm_win_title_set(win, "entry");
> >>                 ecore_x_window_size_get(ecore_x_window_root_first_get(),
> >>                                                 &nw, &nh);
> >>                 evas_object_resize(win, nw, nh);
> >>         } else {
> >>                 printf("couldn't create win!\n");
> >>                 return -1;
> >>         }
> >>         /* load edje */
> >>         ly = load_edj(win, "entry.edj", "ui");
> >>         if (ly == NULL) {
> >>                 printf("Couldn't create layout!\n");
> >>                 return -1;
> >>         }
> >>         elm_win_resize_object_add(win, ly);
> >>         edje_object_signal_callback_add(elm_layout_edje_get(ly),
> >>                         "DONE_EXIT", "*", main_quit_cb, NULL);
> >>
> >>
> >>         tb = elm_entry_add(ly);
> >>         if (tb) {
> >>                 elm_entry_entry_set(tb, "<font size='4' color='white'>");
> >>                 elm_entry_single_line_set(tb, EINA_TRUE);
> >>                 elm_layout_content_set(ly, "input_swallow", tb);
> >>         } else {
> >>                 printf("Got null TB!\n");
> >>                 return -1;
> >>         }
> >>
> >>         evas_object_show(ly);
> >>         evas_object_show(win);
> >>
> >>         elm_run();
> >>         elm_shutdown();
> >>         return 0;
> >> }
> >>
> >> ELM_MAIN();
> >>
> >> /* End entry.c */
> >> /****************************************************************************/
> >>
> >> /****************************************************************************/
> >> /* Begin entry.edc */
> >> collections {
> >>
> >>         group {
> >>                 name: "ui";
> >>                 parts {
> >>
> >>                         part {
> >>                                 name: "background";
> >>                                 type: RECT;
> >>                                 description {
> >>                                         state: "default" 0.0;
> >>                                         color: 0 0 0 100;
> >>                                 }
> >>                                 program {
> >>                                         name: "background_clicked";
> >>                                         source: "background";
> >>                                         signal: "mouse,clicked,*";
> >>                                         action: SIGNAL_EMIT "DONE_EXIT"
> >> "UI"; }
> >>                         }
> >>
> >>                         part {
> >>                                 name: "input_bg";
> >>                                 type: RECT;
> >>                                 description {
> >>                                         state: "default" 0.0;
> >>                                         rel1 { relative: 0.37773 0.04375; }
> >>                                         rel2 { relative: 0.62227 0.06; }
> >>                                         color: 100 100 100 255;
> >>                                         fixed: 1 1;
> >>                                 }
> >>                         }
> >>
> >>                         part {
> >>                                 name: "temp_tb_bg";
> >>                                 type: RECT;
> >>                                 description {
> >>                                         state: "default" 0.0;
> >>                                         rel1 { to: "input_swallow"; }
> >>                                         rel2 { to: "input_swallow"; }
> >>                                         color: 255 0 0 255;
> >>                                         visible: 1;
> >>                                 }
> >>                         }
> >>
> >>                         part {
> >>                                 name: "input_swallow";
> >>                                 type: SWALLOW;
> >>                                 description {
> >>                                         state: "default" 0.0;
> >>                                         rel1 { relative: 0.12 0.15;
> >> to: "input_bg"; }
> >>                                         rel2 { relative: 0.96 0.9; to:
> >> "input_bg"; }
> >>                                         fixed: 1 1;
> >>                                 }
> >>                         }
> >>
> >>                 }
> >>         } //group
> >> }
> >>
> >> /* End entry.edc */
> >> /****************************************************************************/
> >>
> >> ------------------------------------------------------------------------------
> >> All of the data generated in your IT infrastructure is seriously valuable.
> >> Why? It contains a definitive record of application performance, security
> >> threats, fraudulent activity, and more. Splunk takes this data and makes
> >> sense of it. IT sense. And common sense.
> >> http://p.sf.net/sfu/splunk-d2dcopy2
> >> _______________________________________________
> >> enlightenment-devel mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> >
> 
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to