[Xfce4-commits] [apps/xfdashboard] 01/01: Fix again the check if scrolling is needed to get a child visible in a view
noreply at xfce.org
noreply at xfce.org
Fri Jan 29 14:20:30 CET 2016
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit b828c2fbe5387d3670aa27ac9468ed90b94f63b9
Author: Stephan Haller <nomad at froevel.de>
Date: Fri Jan 29 14:20:05 2016 +0100
Fix again the check if scrolling is needed to get a child visible in a view
---
xfdashboard/viewpad.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/xfdashboard/viewpad.c b/xfdashboard/viewpad.c
index 813256f..33a02c9 100644
--- a/xfdashboard/viewpad.c
+++ b/xfdashboard/viewpad.c
@@ -514,6 +514,7 @@ static gboolean _xfdashboard_viewpad_view_needs_scrolling_for_child(XfdashboardV
gboolean viewFitsIntoViewpad;
gboolean needScrolling;
gfloat scrollX, scrollY;
+ gfloat viewpadWidth, viewpadHeight;
g_return_val_if_fail(XFDASHBOARD_IS_VIEWPAD(self), FALSE);
g_return_val_if_fail(XFDASHBOARD_IS_VIEW(inView), FALSE);
@@ -527,20 +528,24 @@ static gboolean _xfdashboard_viewpad_view_needs_scrolling_for_child(XfdashboardV
/* Check if view would fit into this viewpad completely */
if(priv->lastAllocation)
{
+ viewpadWidth=clutter_actor_box_get_width(priv->lastAllocation);
+ viewpadHeight=clutter_actor_box_get_height(priv->lastAllocation);
+
clutter_actor_get_size(CLUTTER_ACTOR(inView), &w, &h);
- if(w<=clutter_actor_box_get_width(priv->lastAllocation) &&
- h<=clutter_actor_box_get_height(priv->lastAllocation))
+ if(w<=viewpadWidth && h<=viewpadHeight) viewFitsIntoViewpad=TRUE;
+ }
+ else
{
- viewFitsIntoViewpad=TRUE;
+ clutter_actor_get_size(CLUTTER_ACTOR(self), &viewpadWidth, &viewpadHeight);
}
- }
/* Get position and size of view but respect scrolled position */
if(inView==priv->activeView)
{
x=xfdashboard_scrollbar_get_value(XFDASHBOARD_SCROLLBAR(priv->hScrollbar));
y=xfdashboard_scrollbar_get_value(XFDASHBOARD_SCROLLBAR(priv->vScrollbar));
- clutter_actor_get_size(CLUTTER_ACTOR(self), &w, &h);
+ w=viewpadWidth;
+ h=viewpadHeight;
}
else
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list