summaryrefslogtreecommitdiff
path: root/src/gtkext/gtkgraphdisplay.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-21 10:54:43 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-21 10:54:43 (GMT)
commit6a444b273cf812c080c57d36a43436bf4aa4d55e (patch)
tree3c46c6e170439436c63f538c3d3ac514eeb68825 /src/gtkext/gtkgraphdisplay.c
parenta34a6015b31f79a7f3b8abc68e3bf05f4a5b9ad0 (diff)
Centered graph view content at first display.
Diffstat (limited to 'src/gtkext/gtkgraphdisplay.c')
-rw-r--r--src/gtkext/gtkgraphdisplay.c41
1 files changed, 4 insertions, 37 deletions
diff --git a/src/gtkext/gtkgraphdisplay.c b/src/gtkext/gtkgraphdisplay.c
index fdd48ce..0aee486 100644
--- a/src/gtkext/gtkgraphdisplay.c
+++ b/src/gtkext/gtkgraphdisplay.c
@@ -93,9 +93,6 @@ static void gtk_graph_display_finalize(GtkGraphDisplay *);
/* S'adapte à la surface concédée par le composant parent. */
static void gtk_graph_display_size_allocate(GtkWidget *, GtkAllocation *);
-/* Centre si possible le contenu du panneau d'affichage. */
-static void gtk_graph_display_update_support_margins(GtkGraphDisplay *, const GtkAllocation *);
-
/* Indique les dimensions de travail du composant d'affichage. */
static void gtk_graph_display_compute_requested_size(GtkGraphDisplay *, gint *, gint *);
@@ -298,36 +295,15 @@ static void gtk_graph_display_finalize(GtkGraphDisplay *display)
static void gtk_graph_display_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
{
GtkGraphDisplay *display; /* Autre version du composant */
-
- GTK_WIDGET_CLASS(gtk_graph_display_parent_class)->size_allocate(widget, allocation);
-
- display = GTK_GRAPH_DISPLAY(widget);
-
- gtk_graph_display_update_support_margins(display, allocation);
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : display = panneau dont le contenu est à déplacer. *
-* allocation = étendue accordée à la vue. *
-* *
-* Description : Centre si possible le contenu du panneau d'affichage. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static void gtk_graph_display_update_support_margins(GtkGraphDisplay *display, const GtkAllocation *allocation)
-{
gint width; /* Largeur totale du support */
gint height; /* Hauteur totale du support */
gint start; /* Bordure horizontale */
gint top; /* Bordure verticale */
+ GTK_WIDGET_CLASS(gtk_graph_display_parent_class)->size_allocate(widget, allocation);
+
+ display = GTK_GRAPH_DISPLAY(widget);
+
gtk_graph_display_compute_requested_size(display, &width, &height);
if (width > allocation->width)
@@ -632,7 +608,6 @@ static void gtk_graph_display_define_main_address(GtkGraphDisplay *display, cons
GBlockList *list; /* Liste de blocs basiques */
gint right; /* Abscisse du coin droit */
gint bottom; /* Ordonnée du coin inférieur */
- GtkAllocation allocation; /* Espace alloué au panneau */
GtkWidget *child; /* Composant sélectionné */
if (display->routine == NULL)
@@ -684,14 +659,6 @@ static void gtk_graph_display_define_main_address(GtkGraphDisplay *display, cons
gtk_fixed_move(GTK_FIXED(display->support), display->extender, right - 1, bottom - 1);
/**
- * Si possible, on centre le contenu obtenu.
- */
-
- gtk_widget_get_allocation(GTK_WIDGET(display), &allocation);
-
- gtk_graph_display_update_support_margins(display, &allocation);
-
- /**
* Première sélection...
*/