diff --git a/src/bin/e_bryce.c b/src/bin/e_bryce.c index 6dc0c97f9..68ef42089 100644 --- a/src/bin/e_bryce.c +++ b/src/bin/e_bryce.c @@ -368,7 +368,7 @@ _bryce_style(Evas_Object *site, Eina_Stringshare *name, Evas_Object *g) char buf[1024]; BRYCE_GET(site); - + ly = elm_layout_add(b->site); snprintf(buf, sizeof(buf), "e/bryce/%s/%s", b->style ?: "default", name ?: "plain"); if (!e_theme_edje_object_set(ly, NULL, buf)) @@ -376,6 +376,11 @@ _bryce_style(Evas_Object *site, Eina_Stringshare *name, Evas_Object *g) evas_object_del(ly); return; } + if (b->orient == E_GADGET_SITE_ORIENT_HORIZONTAL) + elm_layout_signal_emit(ly, "e,state,orient,horizontal", "e"); + else + elm_layout_signal_emit(ly, "e,state,orient,vertical", "e"); + edje_object_message_signal_process(elm_layout_edje_get(ly)); prev = e_gadget_util_layout_style_init(g, ly); elm_object_part_content_set(ly, "e.swallow.content", g); evas_object_smart_callback_call(g, "gadget_reparent", ly); diff --git a/src/bin/e_gadget.c b/src/bin/e_gadget.c index 0d6f21569..f41370f67 100644 --- a/src/bin/e_gadget.c +++ b/src/bin/e_gadget.c @@ -578,16 +578,16 @@ _site_gadget_aspect(E_Gadget_Config *zgc, Evas_Coord *ww, Evas_Coord *hh, int ax switch (aspect) { case EVAS_ASPECT_CONTROL_HORIZONTAL: - *hh = (*ww * (double)ay / ax); + *hh = (*ww * (double)ay / ax) + 0.99999999; break; case EVAS_ASPECT_CONTROL_VERTICAL: - *ww = (*hh * (double)ax / ay); + *ww = (*hh * (double)ax / ay) + 0.99999999; break; default: if (IS_HORIZ(zgc->site->orient)) - *ww = (*hh * (double)ax / ay); + *ww = (*hh * (double)ax / ay) + 0.99999999; else if (IS_VERT(zgc->site->orient)) - *hh = (*ww * (double)ay / ax); + *hh = (*ww * (double)ay / ax) + 0.99999999; else if (aspect) { double ar = ax / (double) ay; @@ -600,9 +600,9 @@ _site_gadget_aspect(E_Gadget_Config *zgc, Evas_Coord *ww, Evas_Coord *hh, int ax *ww = *hh; } else if (ar > 1.0) - *hh = (*ww * (double)ay / ax); + *hh = (*ww * (double)ay / ax) + 0.99999999; else - *ww = (*hh * (double)ax / ay); + *ww = (*hh * (double)ax / ay) + 0.99999999; } } }