[gnome-terminal] profile: editor: Don't compare alpha colour components
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] profile: editor: Don't compare alpha colour components
- Date: Sun, 14 Feb 2016 10:02:27 +0000 (UTC)
commit 49d1f8fbab79a05d082aa6391325c1890609e797
Author: Christian Persch <chpe gnome org>
Date: Sat Feb 13 21:22:25 2016 +0100
profile: editor: Don't compare alpha colour components
src/profile-editor.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 87fae40..b6dbcd9 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -211,14 +211,13 @@ static gboolean
rgba_equal (const GdkRGBA *a,
const GdkRGBA *b)
{
- gdouble dr, dg, db, da;
+ gdouble dr, dg, db;
dr = a->red - b->red;
dg = a->green - b->green;
db = a->blue - b->blue;
- da = a->alpha - b->alpha;
- return (dr * dr + dg * dg + db * db + da * da) < 1e-4;
+ return (dr * dr + dg * dg + db * db) < 1e-4;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]