[gtk+/gtk-style-context: 392/533] Fix the resize handle drawing
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 392/533] Fix the resize handle drawing
- Date: Wed, 1 Dec 2010 02:38:46 +0000 (UTC)
commit a8a65fcaf24763eb96904f1ce7c5b52adff8f3c8
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Nov 17 00:44:36 2010 -0500
Fix the resize handle drawing
gtk/gtkthemingengine.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index caa34eb..886fc8f 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -2277,11 +2277,11 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
sides = gtk_theming_engine_get_junction_sides (engine);
/* reduce confusing values to a meaningful state */
- if (sides & (GTK_JUNCTION_LEFT | GTK_JUNCTION_RIGHT))
- sides &= ~(GTK_JUNCTION_LEFT);
+ if ((sides & (GTK_JUNCTION_LEFT | GTK_JUNCTION_RIGHT)) == (GTK_JUNCTION_LEFT | GTK_JUNCTION_RIGHT))
+ sides &= ~GTK_JUNCTION_LEFT;
- if (sides & (GTK_JUNCTION_TOP | GTK_JUNCTION_BOTTOM))
- sides &= ~(GTK_JUNCTION_TOP);
+ if ((sides & (GTK_JUNCTION_TOP | GTK_JUNCTION_BOTTOM)) == (GTK_JUNCTION_TOP | GTK_JUNCTION_BOTTOM))
+ sides &= ~GTK_JUNCTION_TOP;
if (sides == 0)
sides = (GTK_JUNCTION_BOTTOM | GTK_JUNCTION_RIGHT);
@@ -2292,7 +2292,7 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
if (height < width)
width = height;
}
- else if (sides & (GTK_JUNCTION_LEFT | GTK_JUNCTION_TOP))
+ else if (sides == (GTK_JUNCTION_LEFT | GTK_JUNCTION_TOP))
{
if (width < height)
height = width;
@@ -2301,7 +2301,7 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
skip = 2;
}
- else if (sides & (GTK_JUNCTION_LEFT | GTK_JUNCTION_BOTTOM))
+ else if (sides == (GTK_JUNCTION_LEFT | GTK_JUNCTION_BOTTOM))
{
/* make it square, aligning to bottom left */
if (width < height)
@@ -2314,7 +2314,7 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
skip = 1;
}
- if (sides == GTK_JUNCTION_RIGHT)
+ else if (sides == GTK_JUNCTION_RIGHT)
{
/* aligning to right */
if (height < width)
@@ -2323,7 +2323,7 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
width = height;
}
}
- else if (sides & (GTK_JUNCTION_RIGHT | GTK_JUNCTION_TOP))
+ else if (sides == (GTK_JUNCTION_RIGHT | GTK_JUNCTION_TOP))
{
if (width < height)
height = width;
@@ -2335,7 +2335,7 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
skip = 3;
}
- else if (sides & (GTK_JUNCTION_RIGHT | GTK_JUNCTION_BOTTOM))
+ else if (sides == (GTK_JUNCTION_RIGHT | GTK_JUNCTION_BOTTOM))
{
/* make it square, aligning to bottom right */
if (width < height)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]