[libhandy/wip/haecker-felix/flap-widget] Properly round shadow position
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/wip/haecker-felix/flap-widget] Properly round shadow position
- Date: Wed, 18 Nov 2020 11:43:12 +0000 (UTC)
commit c21e7a63e10e7f14ffef3f5c4abea85b507e155b
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Nov 18 16:42:56 2020 +0500
Properly round shadow position
src/hdy-flap.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/hdy-flap.c b/src/hdy-flap.c
index 16082f8c..7d714a8c 100644
--- a/src/hdy-flap.c
+++ b/src/hdy-flap.c
@@ -541,20 +541,20 @@ hdy_flap_draw (GtkWidget *widget,
if (self->flap_position == GTK_PACK_START) {
shadow_direction = GTK_PAN_DIRECTION_UP;
- shadow_y = flap_height * self->reveal_progress;
+ shadow_y = (gint) round (flap_height * self->reveal_progress);
} else {
shadow_direction = GTK_PAN_DIRECTION_DOWN;
- shadow_y = -flap_height * self->reveal_progress;
+ shadow_y = (gint) -round (flap_height * self->reveal_progress);
}
} else {
gint flap_width = gtk_widget_get_allocated_width (self->flap);
if (self->flap_position == get_start_or_end (self)) {
shadow_direction = GTK_PAN_DIRECTION_LEFT;
- shadow_x = flap_width * self->reveal_progress;
+ shadow_x = (gint) round (flap_width * self->reveal_progress);
} else {
shadow_direction = GTK_PAN_DIRECTION_RIGHT;
- shadow_x = -flap_width * self->reveal_progress;
+ shadow_x = (gint) -round (flap_width * self->reveal_progress);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]