[gtk+/wip/cssnode3: 95/101] entry: Ignore the "icon-prelight" style property



commit 3fecc44b67c8a7ecee7e7c5b71af4df6edbbef4d
Author: Benjamin Otte <otte redhat com>
Date:   Tue Mar 10 17:21:29 2015 +0100

    entry: Ignore the "icon-prelight" style property
    
    Always prelight icons. CSS is powerful enough to let people keep the
    appearance the same upon prelight.

 gtk/gtkentry.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 2bd4d41..c0c32eb 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -1511,13 +1511,17 @@ gtk_entry_class_init (GtkEntryClass *class)
    * icons prelight on mouseover.
    *
    * Since: 2.16
+   *
+   * Deprecated: 3.18: Activatable icons are always prelit on hover.
+   *   Just don't style the :hover style if you don't want them to
+   *   look different.
    */
   gtk_widget_class_install_style_property (widget_class,
                                            g_param_spec_boolean ("icon-prelight",
                                                                  P_("Icon Prelight"),
                                                                  P_("Whether activatable icons should 
prelight when hovered"),
                                                                  TRUE,
-                                                                 
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY));
+                                                                 
GTK_PARAM_READABLE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED));
 
   /**
    * GtkEntry:progress-border:
@@ -3814,7 +3818,6 @@ should_prelight (GtkEntry             *entry,
 {
   GtkEntryPrivate *priv = entry->priv;
   EntryIconInfo *icon_info = priv->icons[icon_pos];
-  gboolean prelight;
 
   if (!icon_info)
     return FALSE;
@@ -3825,11 +3828,7 @@ should_prelight (GtkEntry             *entry,
   if (icon_info->pressed)
     return FALSE;
 
-  gtk_widget_style_get (GTK_WIDGET (entry),
-                        "icon-prelight", &prelight,
-                        NULL);
-
-  return prelight;
+  return TRUE;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]