summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/gtkgraphdisplay.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gtkext/gtkgraphdisplay.c b/src/gtkext/gtkgraphdisplay.c
index 0c65c23..51ca344 100644
--- a/src/gtkext/gtkgraphdisplay.c
+++ b/src/gtkext/gtkgraphdisplay.c
@@ -365,7 +365,18 @@ static void gtk_graph_display_compute_requested_size(GtkGraphDisplay *display, g
if (display->cluster != NULL)
{
g_graph_cluster_compute_needed_alloc(display->cluster, &needed);
- //assert(needed.x == 0 && needed.y == 0);
+
+ /**
+ * Les liens latéraux peuvent décaler les composants du graphique vers
+ * la droite, donc needed.x est parfois non nul.
+ *
+ * Il n'y a ainsi pas d'assurance d'obtenir needed.x == 0, et on ajuste
+ * en fonction de ce décalage.
+ */
+
+ assert(needed.y == 0);
+
+ needed.width += needed.x;
needed.width += 2 * GRAPH_MARGIN;
needed.height += 2 * GRAPH_MARGIN;