[gnome-shell] StScrollView: fix scrollbar allocation when one scrollbar isn't shown
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] StScrollView: fix scrollbar allocation when one scrollbar isn't shown
- Date: Fri, 26 Mar 2010 15:06:49 +0000 (UTC)
commit 3f5bb8f98df581018f729d60bf549ebec5400228
Author: Dan Winship <danw gnome org>
Date: Thu Mar 25 18:23:14 2010 -0400
StScrollView: fix scrollbar allocation when one scrollbar isn't shown
https://bugzilla.gnome.org/show_bug.cgi?id=613964
src/st/st-scroll-view.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/st/st-scroll-view.c b/src/st/st-scroll-view.c
index 4e6821b..a8c9b33 100644
--- a/src/st/st-scroll-view.c
+++ b/src/st/st-scroll-view.c
@@ -653,7 +653,7 @@ st_scroll_view_allocate (ClutterActor *actor,
child_box.x1 = content_box.x2 - sb_width;
child_box.y1 = content_box.y1;
child_box.x2 = content_box.x2;
- child_box.y2 = content_box.y2 - sb_height;
+ child_box.y2 = content_box.y2 - (hscrollbar_visible ? sb_height : 0);
clutter_actor_allocate (priv->vscroll, &child_box, flags);
}
@@ -663,13 +663,15 @@ st_scroll_view_allocate (ClutterActor *actor,
{
child_box.x1 = content_box.x1;
child_box.y1 = content_box.y2 - sb_height;
- child_box.x2 = content_box.x2 - sb_width;
+ child_box.x2 = content_box.x2 - (vscrollbar_visible ? sb_width : 0);
child_box.y2 = content_box.y2;
clutter_actor_allocate (priv->hscroll, &child_box, flags);
}
- /* Fold visibility into the scrollbar sizes to simplify the rest of the computations */
+ /* Now fold visibility into the scrollbar sizes to simplify the rest
+ * of the computations.
+ */
if (!hscrollbar_visible)
sb_height = 0;
if (!vscrollbar_visible)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]