From f330003efacc212ac9ec9b9ffcd38bd42e2fc9f5 Mon Sep 17 00:00:00 2001 From: Artem Garmash Date: Mon, 18 Jan 2010 00:21:11 +0200 Subject: [PATCH] Fix scrolling animation glitches. Increase footer press area. --- src/el-home-applet.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/el-home-applet.c b/src/el-home-applet.c index 236c783..606b92e 100644 --- a/src/el-home-applet.c +++ b/src/el-home-applet.c @@ -55,8 +55,9 @@ #define HEADER_HEIGHT 48 #define FOOTER_HEIGHT 24 -#define FOOTER_HEIGHT_PRESS 48 /* approx, used only for checking clicks, bigger than controls */ -#define FOOTER_WIDTH C_WIDTH/5 +#define FOOTER_HEIGHT_PRESS FOOTER_HEIGHT*2 /* approx, used only for checking clicks */ +#define FOOTER_WIDTH C_WIDTH/4 +#define FOOTER_WIDTH_PRESS (FOOTER_WIDTH + FOOTER_WIDTH/2) /* approx, used only for checking clicks, bigger than controls */ #define MESSAGE_HEIGHT (C_HEIGHT - HEADER_HEIGHT - FOOTER_HEIGHT) #define MESSAGE_WIDTH (C_WIDTH - 2*HILDON_MARGIN_DEFAULT) @@ -1077,7 +1078,7 @@ scroll_anim_cb (ELHomeApplet *self) 3*CONTENT_OFFSET_X, HEADER_HEIGHT + CONTENT_OFFSET_Y_TOP, MESSAGE_WIDTH, - C_HEIGHT - priv->received->allocation.height - HEADER_HEIGHT); + MESSAGE_HEIGHT); to_continue = priv->scroll_offset <= priv->hidden_message_height; if (!to_continue) { @@ -1103,7 +1104,7 @@ button_press_event_cb (GtkWidget *widget, priv->active = SELECTED_HEADER; } else if (event->y > (BOX_HEIGHT - CONTENT_OFFSET_Y_BOTTOM - FOOTER_HEIGHT_PRESS) && - event->x < FOOTER_WIDTH) + event->x < FOOTER_WIDTH_PRESS) priv->active = SELECTED_FOOTER; else priv->active = SELECTED_BODY; -- 1.7.9.5