summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-24 04:22:30 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-24 04:22:30 -0300
commit66000509b5ffee02b3fd220d27a9b02b9fdfc4c9 (patch)
treee27b9e3338be1659dacd8c46b124bdb3bec0faab /gui
parent86b414cd4c0e1445c23b62806a9400b9955ded88 (diff)
downloadeeshow-66000509b5ffee02b3fd220d27a9b02b9fdfc4c9.tar.gz
eeshow-66000509b5ffee02b3fd220d27a9b02b9fdfc4c9.tar.bz2
eeshow-66000509b5ffee02b3fd220d27a9b02b9fdfc4c9.zip
gui/index.c (thumb_set_style): highlight changed sheets in diff mode
Diffstat (limited to 'gui')
-rw-r--r--gui/index.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gui/index.c b/gui/index.c
index 8d857e9..bf98394 100644
--- a/gui/index.c
+++ b/gui/index.c
@@ -16,6 +16,7 @@
#include <gtk/gtk.h>
#include "gfx/record.h"
+#include "kicad/delta.h"
#include "gui/aoi.h"
#include "gui/style.h"
#include "gui/over.h"
@@ -130,7 +131,9 @@ static void thumb_click(void *user)
static void thumb_set_style(struct gui_sheet *sheet, bool selected)
{
+ struct gui_ctx *ctx = sheet->ctx;
struct overlay_style style = overlay_style_dense;
+ const struct gui_sheet *old;
style.radius = 3;
style.pad = SHEET_PAD;
@@ -142,6 +145,13 @@ static void thumb_set_style(struct gui_sheet *sheet, bool selected)
style.bg = RGBA(1, 1, 1, 1);
}
+ if (ctx->old_hist && ctx->diff_mode == diff_delta) {
+ old = find_corresponding_sheet(ctx->old_hist->sheets,
+ ctx->new_hist->sheets, sheet);
+ if (!sheet_eq(sheet->sch, old->sch))
+ style.bg = RGBA(1.0, 1.0, 0, 1);
+ }
+
overlay_style(sheet->thumb_over, &style);
}