aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/options_font.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-03-01 17:17:56 +0100
committerBoris Faure <billiob@gmail.com>2015-03-01 17:20:18 +0100
commit65d729ce323b72c9e52967d77609e3f1e0df075e (patch)
tree9798b730e660c8d0a0cc6d3426d12ff6d1af24bd /src/bin/options_font.c
parenttyls: rewrite size_print to avoid arithmetic exception (diff)
downloadterminology-65d729ce323b72c9e52967d77609e3f1e0df075e.tar.gz
font selector: use bg/fg for the preview from config/theme
Diffstat (limited to 'src/bin/options_font.c')
-rw-r--r--src/bin/options_font.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bin/options_font.c b/src/bin/options_font.c
index 4580d61..19ade5a 100644
--- a/src/bin/options_font.c
+++ b/src/bin/options_font.c
@@ -204,9 +204,15 @@ _cb_op_font_preview_delayed_eval(void *data)
if (ELM_RECTS_INTERSECT(ox, oy, ow, oh, vx, vy, vw, vh))
{
char buf[4096];
-
- o = evas_object_text_add(evas_object_evas_get(obj));
- evas_object_color_set(o, 0, 0, 0, 255);
+ int r, g, b, a;
+ Evas *evas = evas_object_evas_get(obj);
+ Evas_Object *textgrid = termio_textgrid_get(f->term);
+
+ evas_object_textgrid_palette_get(textgrid, EVAS_TEXTGRID_PALETTE_STANDARD,
+ 0, &r, &g, &b, &a);
+
+ o = evas_object_text_add(evas);
+ evas_object_color_set(o, r, g, b, a);
evas_object_text_text_set(o, TEST_STRING);
evas_object_scale_set(o, elm_config_scale_get());
if (f->bitmap)