[gtk+] Remove opacity-groups
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Remove opacity-groups
- Date: Sun, 6 Oct 2013 06:57:16 +0000 (UTC)
commit 5bdfdcadfffaaed24cead56ea31df9095ad536fa
Author: Alexander Larsson <alexl redhat com>
Date: Thu Jul 4 11:41:00 2013 +0000
Remove opacity-groups
GtkWidget had a hack where if opacity is 0.999 we set up an opacity group when
rendering the widget. This is no longer needed in 3.10, and GtkStack doesn't
use it anymore.
GdStack is using it, so applications should be ported from GdStack to GtkStack
in 3.12.
https://bugzilla.gnome.org/show_bug.cgi?id=703603
gtk/gtkwidget.c | 31 -------------------------------
1 files changed, 0 insertions(+), 31 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 9adf3e4..1f05c8b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -460,8 +460,6 @@ struct _GtkWidgetPrivate
/* SizeGroup related flags */
guint have_size_groups : 1;
- guint opacity_group : 1;
-
guint8 alpha;
guint8 user_alpha;
@@ -6584,7 +6582,6 @@ _gtk_widget_draw (GtkWidget *widget,
cairo_save (cr);
push_group =
- widget->priv->opacity_group ||
(widget->priv->alpha != 255 &&
!gtk_widget_is_toplevel (widget));
@@ -14986,27 +14983,6 @@ gtk_widget_update_alpha (GtkWidget *widget)
}
}
-static void
-gtk_widget_set_has_opacity_group (GtkWidget *widget,
- gboolean has_opacity_group)
-{
- GtkWidgetPrivate *priv;
-
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- priv = widget->priv;
-
- has_opacity_group = !!has_opacity_group;
-
- if (priv->opacity_group == has_opacity_group)
- return;
-
- priv->opacity_group = has_opacity_group;
-
- if (gtk_widget_get_realized (widget))
- gtk_widget_queue_draw (widget);
-}
-
/**
* gtk_widget_set_opacity:
* @widget: a #GtkWidget
@@ -15044,13 +15020,6 @@ gtk_widget_set_opacity (GtkWidget *widget,
alpha = round (opacity * 255);
- /* As a kind of hack for internal use we treat an alpha very
- close to 1.0 (rounds to 255) but not 1.0 as specifying that
- we want the opacity group behaviour wrt draw handling, but
- not actually an alpha value. See bug #687842 for discussions. */
- gtk_widget_set_has_opacity_group (widget,
- alpha == 255 && opacity != 1.0);
-
if (alpha == priv->user_alpha)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]