]> www.fi.muni.cz Git - evince.git/commitdiff
Calculate shadow size only when there is actually a shadow.
authorMarco Pesenti Gritti <mpg@redhat.com>
Sat, 16 Apr 2005 12:02:20 +0000 (12:02 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Sat, 16 Apr 2005 12:02:20 +0000 (12:02 +0000)
2005-04-16  Marco Pesenti Gritti <mpg@redhat.com>

        * shell/ev-window.c: (update_view_size):

        Calculate shadow size only when there is actually
        a shadow.

ChangeLog
shell/ev-window.c

index b7000165c6a7dfa95ac25e767c31457996caaac4..c498d3de0aaefdb8ba1b161afc16d8c7b154a860 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-04-16  Marco Pesenti Gritti <mpg@redhat.com>
+
+       * shell/ev-window.c: (update_view_size):
+
+       Calculate shadow size only when there is actually
+       a shadow.
+
 2005-04-16  Marco Pesenti Gritti <mpg@redhat.com>
 
        * shell/ev-view.c: (ev_view_set_spacing), (ev_view_init):
index 372520c1151cdcf4b12bc867754c300ac23fbe10..2a67b891652034be3ede47daee5395e21a9b017a 100644 (file)
@@ -1683,9 +1683,12 @@ update_view_size (EvWindow *window)
        width = window->priv->scrolled_window->allocation.width;
        height = window->priv->scrolled_window->allocation.height;
 
-       /* the scrolled window has a GTK_SHADOW_IN */
-       width -= 2 * window->priv->view->style->xthickness;
-       height -= 2 * window->priv->view->style->ythickness;
+       if (gtk_scrolled_window_get_shadow_type
+               (GTK_SCROLLED_WINDOW (window->priv->scrolled_window)) == GTK_SHADOW_IN)
+       {
+               width -= 2 * window->priv->view->style->xthickness;
+               height -= 2 * window->priv->view->style->ythickness;
+       }
 
        if (window->priv->sizing_mode == EV_SIZING_BEST_FIT) {
                ev_view_set_size (EV_VIEW (window->priv->view),