Changeset 190

Show
Ignore:
Timestamp:
05/21/06 11:03:54 (2 years ago)
Author:
jordi
Message:

The Gtk+ PageView? now calculates correctly the ammount of space left for the document page. I forgot that the thickness is also applied to the GtkImage? and that the scrollbar spacing must only be applied once for scrollbar.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gtk/PageView.cxx

    r189 r190  
    460460    g_assert (NULL != height && "Tried to save the height to a NULL pointer."); 
    461461   
    462     gint borderWidth = GTK_CONTAINER (widget)->border_width; 
    463     gint borderHeight = GTK_CONTAINER (widget)->border_width; 
     462    gint borderWidth = widget->style->xthickness; 
     463    gint borderHeight = widget->style->ythickness; 
    464464    if ( GTK_SHADOW_NONE != 
    465465            gtk_scrolled_window_get_shadow_type (GTK_SCROLLED_WINDOW (widget)) ) 
     
    474474    GtkWidget *vScrollBar = GTK_SCROLLED_WINDOW (widget)->vscrollbar; 
    475475    *width = vScrollBar->allocation.width + 
    476              (scrollBarSpacing + PAGE_VIEW_PADDING + borderWidth) * 2; 
     476             (PAGE_VIEW_PADDING + borderWidth) * 2 + scrollBarSpacing; 
    477477 
    478478    GtkWidget *hScrollBar = GTK_SCROLLED_WINDOW (widget)->hscrollbar; 
    479479    *height = hScrollBar->allocation.height + 
    480               (scrollBarSpacing + PAGE_VIEW_PADDING + borderHeight) * 2; 
     480              (PAGE_VIEW_PADDING + borderHeight) * 2 + scrollBarSpacing; 
    481481} 
    482482