summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/comp.c6
-rw-r--r--gui/gui.h11
2 files changed, 13 insertions, 4 deletions
diff --git a/gui/comp.c b/gui/comp.c
index 45a1de0..3a9cb25 100644
--- a/gui/comp.c
+++ b/gui/comp.c
@@ -48,6 +48,8 @@ struct comp_aoi_ctx {
#define COMP_W 100
+unsigned comp_pop_width = COMP_W;
+
/* ----- Bounding box ------------------------------------------------------ */
@@ -166,9 +168,9 @@ static bool hover_comp(void *user, bool on, int dx, int dy)
overlay_remove_all(&gui->pop_overlays);
overlay_remove_all(&gui->pop_underlays);
- add_pop_header(gui, COMP_W, ctx->ref);
+ add_pop_header(gui, comp_pop_width, ctx->ref);
for (item = ctx->items; item; item = item->next)
- add_pop_item(gui, comp_click, (void *) item, COMP_W, 0,
+ add_pop_item(gui, comp_click, (void *) item, comp_pop_width, 0,
"%s", item->tag);
add_pop_frame(gui);
diff --git a/gui/gui.h b/gui/gui.h
index d3f0fab..0698b33 100644
--- a/gui/gui.h
+++ b/gui/gui.h
@@ -1,8 +1,8 @@
/*
* gui/gui.h - GUI for eeshow
*
- * Written 2016 by Werner Almesberger
- * Copyright 2016 by Werner Almesberger
+ * Written 2016-2017 by Werner Almesberger
+ * Copyright 2016-2017 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,6 +18,13 @@
#include "kicad/ext.h"
+/*
+ * @@@ ought to pass this to run_gui, then share via common.h, but let's be
+ * pragmatic :-)
+ */
+
+extern unsigned comp_pop_width;
+
int run_gui(const struct file_names *fn, bool recurse, int limit,
const char **commands, unsigned n_commands);