[gtk+] label: Properly calculate half the height
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] label: Properly calculate half the height
- Date: Mon, 20 Mar 2017 19:53:58 +0000 (UTC)
commit c371a86f545478a4e46867afd0a9c6cf0ffe963d
Author: Timm Bäder <mail baedert org>
Date: Mon Mar 20 17:20:12 2017 +0100
label: Properly calculate half the height
Since we compare it to a double anyway, might as well divide by 2.0.
gtk/gtklabel.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 268f9c8..54676ec 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3406,7 +3406,7 @@ gtk_label_update_layout_width (GtkLabel *label)
x0 = width / 2;
y0 = dx ? x0 * dy / dx : G_MAXDOUBLE;
- vertical = fabs (y0) > height / 2;
+ vertical = fabs (y0) > height / 2.0;
if (vertical)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]