diff options
Diffstat (limited to 'src/gtkext')
| -rw-r--r-- | src/gtkext/hexdisplay.c | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/src/gtkext/hexdisplay.c b/src/gtkext/hexdisplay.c index 49da03a..f557513 100644 --- a/src/gtkext/hexdisplay.c +++ b/src/gtkext/hexdisplay.c @@ -232,19 +232,23 @@ static void gtk_hex_display_size_allocate(GtkWidget *widget, GtkAllocation *allo      GBufferCache *cache;                    /* Contenu représenté          */      gint text_pos;                          /* Abscisse minimale du texte  */      bool show_pos;                          /* Affichage des positions ?   */ +    GWidthTracker *tracker;                 /* Gestionnaire de largeurs    */ +    gint padding;                           /* Bourrage supplémentaire     */      bool changed;                           /* Note toute variation        */      display = GTK_HEX_DISPLAY(widget);      cache = g_buffer_view_get_cache(GTK_BUFFER_DISPLAY(display)->view); -      text_pos = g_buffer_cache_get_text_position(cache); -      g_object_unref(G_OBJECT(cache));      show_pos = g_display_options_get(GTK_DISPLAY_PANEL(widget)->options, 0); -    changed = g_hex_generator_auto_fit(display->generator, text_pos, show_pos, allocation->width); +    tracker = g_buffer_cache_get_width_tracker(display->cache); +    padding = g_width_tracker_get_column_min_width(tracker, HLC_PADDING); +    g_object_unref(G_OBJECT(tracker)); + +    changed = g_hex_generator_auto_fit(display->generator, text_pos, show_pos, padding, allocation->width);      if (changed)          gtk_hex_display_populate_cache(display); | 
