Hey, Elementarers,

IMO, elm_theme_overlay_add() is kinda useless (at least severely
borked) if it, like now, *appends* to the list of themes, instead of
prepending.

Consider this test case, attached.
Shouldn't we fix it to prepend instead?

--
Gustavo Lima Chaves
Senior Developer @ Intel - Open Source Technology Center
#include <Elementary.h>
#include <Elementary_Cursor.h>

#define WIDTH  320
#define HEIGHT 480

//gcc -g `pkg-config --libs --cflags elementary evas` elm_bg.c -o test

static char def_theme[PATH_MAX] = "";

EAPI int
elm_main(int    argc,
         char **argv)
{
   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   Evas_Object *win, *bg, *icon, *border, *ly;

   printf("adding overlay for a white rect\n");
   snprintf(def_theme, sizeof(def_theme), "./def.edj");
   elm_theme_overlay_add(NULL, def_theme);

   printf("adding overlay for a RED rect\n");
   snprintf(def_theme, sizeof(def_theme), "./def-over.edj");
   elm_theme_overlay_add(NULL, def_theme);

   win = elm_win_add(NULL, "win", ELM_WIN_BASIC);
   elm_win_title_set(win, "win");
   elm_win_autodel_set(win, 1);

   bg = elm_bg_add(win);
   elm_win_resize_object_add(win, bg);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_show(bg);

   evas_object_resize(win, WIDTH, HEIGHT);
   evas_object_show(win);

   elm_run();
   elm_shutdown();
   return 0;
}

ELM_MAIN()
collections {

   group {
      name: "elm/bg/base/default";

      /* Change the background to OEM specific one.
       *
       * Uses a solid dark gray color, could be an image.
       */

      parts {
         part {
            name: "bg";
            type: RECT;
            mouse_events: 0;
            description {
               state: "default" 0.0;
               color: 255 255 255 255;
            }
         }
      }
   }
}
collections {

   group {
      name: "elm/bg/base/default";

      /* Change the background to OEM specific one.
       *
       * Uses a solid dark gray color, could be an image.
       */

      parts {
         part {
            name: "bg";
            type: RECT;
            mouse_events: 0;
            description {
               state: "default" 0.0;
               color: 255 0 0 255;
            }
         }
      }
   }
}
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to