Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-04-16 12:02:20 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-04-16 12:02:20 (GMT)
commitf47b89da690d2b954423b800dd106694f82f7587 (patch)
treeebec24079f28d74e129b37a0941ffff152de9b45
parentb4819076814b5294e4b52f5695d92ae2d79df0d6 (diff)
Calculate shadow size only when there is actually a shadow.
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.
-rw-r--r--ChangeLog7
-rw-r--r--shell/ev-window.c9
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b700016..c498d3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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):
* shell/ev-view.h:
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 372520c..2a67b89 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -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),