[gegl] bin: skip some transparent draw calls in dir view
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] bin: skip some transparent draw calls in dir view
- Date: Tue, 29 Jan 2019 17:03:18 +0000 (UTC)
commit 429aeba100769b43392324626cf457059f0ac703
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Jan 29 01:32:09 2019 +0100
bin: skip some transparent draw calls in dir view
bin/ui.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/bin/ui.c b/bin/ui.c
index 9d5bca4d9..f5e687fd1 100644
--- a/bin/ui.c
+++ b/bin/ui.c
@@ -1511,10 +1511,10 @@ static void ui_dir_viewer (State *o)
cairo_rectangle (mrg_cr (mrg), x, y, dim, dim);
if (no == o->entry_no + 1)
+ {
cairo_set_source_rgba (mrg_cr (mrg), 1,1,0,.5);
- else
- cairo_set_source_rgba (mrg_cr (mrg), 1,1,1,.0);
- cairo_fill_preserve (mrg_cr (mrg));
+ cairo_fill_preserve (mrg_cr (mrg));
+ }
mrg_listen_full (mrg, MRG_CLICK, run_command, "parent", NULL, NULL, NULL);
mrg_image (mrg, x + (dim-wdim)/2 + dim * padding, y + (dim-hdim)/2 + dim * padding,
@@ -1550,11 +1550,10 @@ static void ui_dir_viewer (State *o)
cairo_rectangle (mrg_cr (mrg), x, y, dim, dim);
if (no == o->entry_no + 1)
+ {
cairo_set_source_rgba (mrg_cr (mrg), 1,1,0,.5);
- else
- cairo_set_source_rgba (mrg_cr (mrg), 1,1,1,.0);
- cairo_fill (mrg_cr (mrg));
-
+ cairo_fill (mrg_cr (mrg));
+ }
mrg_image (mrg, x + (dim-wdim)/2 + dim * padding, y + (dim-hdim)/2 + dim * padding,
wdim * (1.0-padding*2), hdim *(1.0-padding*2), 1.0,
@@ -1607,11 +1606,13 @@ static void ui_dir_viewer (State *o)
cairo_rectangle (mrg_cr (mrg), x, y, wdim, hdim);
if (no == o->entry_no + 1)
+ {
cairo_set_source_rgba (mrg_cr (mrg), 1,1,0,1.0);
- else
- cairo_set_source_rgba (mrg_cr (mrg), 1,1,1,.0);
+ cairo_fill_preserve (mrg_cr (mrg));
+ }
+
mrg_listen (mrg, MRG_TAP, entry_load, o, (void*)g_intern_string (iter->data));
- cairo_fill (mrg_cr (mrg));
+ cairo_new_path (mrg_cr (mrg));
if (w!=0 && h!=0)
mrg_image (mrg, x + (dim-wdim)/2 + dim * padding, y + (dim-hdim)/2 + dim * padding,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]