diff options
author | Boris Faure <billiob@gmail.com> | 2015-03-01 17:17:56 +0100 |
---|---|---|
committer | Boris Faure <billiob@gmail.com> | 2015-03-01 17:20:18 +0100 |
commit | 65d729ce323b72c9e52967d77609e3f1e0df075e (patch) | |
tree | 9798b730e660c8d0a0cc6d3426d12ff6d1af24bd | |
parent | 4d7708a0f181f6e326bb3b7455c3806da53912eb (diff) |
font selector: use bg/fg for the preview from config/theme
-rw-r--r-- | data/themes/default.edc | 4 | ||||
-rw-r--r-- | src/bin/options_font.c | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/data/themes/default.edc b/data/themes/default.edc index 1d0eb46..37d1d9f 100644 --- a/data/themes/default.edc +++ b/data/themes/default.edc | |||
@@ -4404,7 +4404,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target: | |||
4404 | part { name: "base"; type: RECT; | 4404 | part { name: "base"; type: RECT; |
4405 | mouse_events: 1; | 4405 | mouse_events: 1; |
4406 | description { state: "default" 0.0; | 4406 | description { state: "default" 0.0; |
4407 | color: 255 255 255 255; | 4407 | color: BG_COL; |
4408 | rel1.offset: 2 2; | 4408 | rel1.offset: 2 2; |
4409 | rel2.offset: -3 -3; | 4409 | rel2.offset: -3 -3; |
4410 | } | 4410 | } |
@@ -4415,7 +4415,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target: | |||
4415 | rel2.to: "base"; | 4415 | rel2.to: "base"; |
4416 | color: 255 255 255 255; | 4416 | color: 255 255 255 255; |
4417 | } | 4417 | } |
4418 | } | 4418 | } |
4419 | part { name: "terminology.text.preview"; type: SWALLOW; | 4419 | part { name: "terminology.text.preview"; type: SWALLOW; |
4420 | clip_to: "clip"; | 4420 | clip_to: "clip"; |
4421 | description { state: "default" 0.0; | 4421 | description { state: "default" 0.0; |
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) | |||
204 | if (ELM_RECTS_INTERSECT(ox, oy, ow, oh, vx, vy, vw, vh)) | 204 | if (ELM_RECTS_INTERSECT(ox, oy, ow, oh, vx, vy, vw, vh)) |
205 | { | 205 | { |
206 | char buf[4096]; | 206 | char buf[4096]; |
207 | 207 | int r, g, b, a; | |
208 | o = evas_object_text_add(evas_object_evas_get(obj)); | 208 | Evas *evas = evas_object_evas_get(obj); |
209 | evas_object_color_set(o, 0, 0, 0, 255); | 209 | Evas_Object *textgrid = termio_textgrid_get(f->term); |
210 | |||
211 | evas_object_textgrid_palette_get(textgrid, EVAS_TEXTGRID_PALETTE_STANDARD, | ||
212 | 0, &r, &g, &b, &a); | ||
213 | |||
214 | o = evas_object_text_add(evas); | ||
215 | evas_object_color_set(o, r, g, b, a); | ||
210 | evas_object_text_text_set(o, TEST_STRING); | 216 | evas_object_text_text_set(o, TEST_STRING); |
211 | evas_object_scale_set(o, elm_config_scale_get()); | 217 | evas_object_scale_set(o, elm_config_scale_get()); |
212 | if (f->bitmap) | 218 | if (f->bitmap) |