options_themepv: add color scheme option
This commit is contained in:
parent
16cdc7ae10
commit
0ea7705195
|
@ -59,6 +59,7 @@ _cb_op_theme_content_get(void *data, Evas_Object *obj, const char *part)
|
||||||
|
|
||||||
o = options_theme_preview_add(obj, config,
|
o = options_theme_preview_add(obj, config,
|
||||||
theme_path_get(t->name),
|
theme_path_get(t->name),
|
||||||
|
NULL,
|
||||||
128 * elm_config_scale_get(),
|
128 * elm_config_scale_get(),
|
||||||
64 * elm_config_scale_get());
|
64 * elm_config_scale_get());
|
||||||
return o;
|
return o;
|
||||||
|
|
|
@ -95,8 +95,10 @@ _cb_resize(void *_data EINA_UNUSED,
|
||||||
|
|
||||||
Evas_Object *
|
Evas_Object *
|
||||||
options_theme_preview_add(Evas_Object *parent,
|
options_theme_preview_add(Evas_Object *parent,
|
||||||
Config *config,
|
const Config *config,
|
||||||
const char *file, Evas_Coord w, Evas_Coord h)
|
const char *file,
|
||||||
|
const Color_Scheme *cs,
|
||||||
|
Evas_Coord w, Evas_Coord h)
|
||||||
{
|
{
|
||||||
Evas_Object *o, *oo, *obase, *oe, *obg;
|
Evas_Object *o, *oo, *obase, *oe, *obg;
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
|
@ -111,7 +113,7 @@ options_theme_preview_add(Evas_Object *parent,
|
||||||
oe = elm_layout_edje_get(o);
|
oe = elm_layout_edje_get(o);
|
||||||
obg = oe;
|
obg = oe;
|
||||||
theme_apply(oe, config, "terminology/background",
|
theme_apply(oe, config, "terminology/background",
|
||||||
file, NULL, EINA_FALSE);
|
file, cs, EINA_FALSE);
|
||||||
if (config->translucent)
|
if (config->translucent)
|
||||||
edje_object_signal_emit(oe, "translucent,on", "terminology");
|
edje_object_signal_emit(oe, "translucent,on", "terminology");
|
||||||
else
|
else
|
||||||
|
@ -133,7 +135,7 @@ options_theme_preview_add(Evas_Object *parent,
|
||||||
o = elm_layout_add(parent);
|
o = elm_layout_add(parent);
|
||||||
oe = elm_layout_edje_get(o);
|
oe = elm_layout_edje_get(o);
|
||||||
theme_apply(oe, config, "terminology/core",
|
theme_apply(oe, config, "terminology/core",
|
||||||
file, NULL, EINA_FALSE);
|
file, cs, EINA_FALSE);
|
||||||
if (config->translucent)
|
if (config->translucent)
|
||||||
edje_object_signal_emit(oe, "translucent,on", "terminology");
|
edje_object_signal_emit(oe, "translucent,on", "terminology");
|
||||||
else
|
else
|
||||||
|
@ -207,21 +209,19 @@ options_theme_preview_add(Evas_Object *parent,
|
||||||
|
|
||||||
// create a cursor and put it in the grid
|
// create a cursor and put it in the grid
|
||||||
o = elm_layout_add(parent);
|
o = elm_layout_add(parent);
|
||||||
oe = elm_layout_edje_get(o);
|
theme_apply(o, config, "terminology/cursor",
|
||||||
theme_apply(oe, config, "terminology/cursor",
|
file, cs, EINA_TRUE);
|
||||||
file, NULL, EINA_FALSE);
|
elm_layout_signal_emit(o, "focus,in", "terminology");
|
||||||
edje_object_signal_emit(oe, "focus,in", "terminology");
|
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
evas_object_data_set(oo, "cursor", o);
|
evas_object_data_set(oo, "cursor", o);
|
||||||
elm_grid_pack(oo, o, 0, 0, 10, 10);
|
elm_grid_pack(oo, o, 0, 0, 10, 10);
|
||||||
|
|
||||||
// create a selection and put it in the grid
|
// create a selection and put it in the grid
|
||||||
o = edje_object_add(evas);
|
o = edje_object_add(evas);
|
||||||
oe = o;
|
theme_apply(o, config, "terminology/selection",
|
||||||
theme_apply(oe, config, "terminology/selection",
|
file, cs, EINA_FALSE);
|
||||||
file, NULL, EINA_FALSE);
|
edje_object_signal_emit(o, "focus,in", "terminology");
|
||||||
edje_object_signal_emit(oe, "focus,in", "terminology");
|
edje_object_signal_emit(o, "mode,oneline", "terminology");
|
||||||
edje_object_signal_emit(oe, "mode,oneline", "terminology");
|
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
evas_object_data_set(oo, "selection", o);
|
evas_object_data_set(oo, "selection", o);
|
||||||
elm_grid_pack(oo, o, 0, 0, 10, 10);
|
elm_grid_pack(oo, o, 0, 0, 10, 10);
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
#ifndef _OPTIONS_THEMEPV_H__
|
#ifndef _OPTIONS_THEMEPV_H__
|
||||||
#define _OPTIONS_THEMEPV_H__ 1
|
#define _OPTIONS_THEMEPV_H__ 1
|
||||||
|
#include "colors.h"
|
||||||
|
|
||||||
Evas_Object *options_theme_preview_add(Evas_Object *parent, Config *config, const char *file, Evas_Coord w, Evas_Coord h);
|
Evas_Object *
|
||||||
|
options_theme_preview_add(Evas_Object *parent,
|
||||||
|
const Config *config,
|
||||||
|
const char *file,
|
||||||
|
const Color_Scheme *cs,
|
||||||
|
Evas_Coord w,
|
||||||
|
Evas_Coord h);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue