[maemo-commits] [maemo-commits] r10804 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Mar 28 14:17:17 EEST 2007
Author: tko
Date: 2007-03-28 14:17:16 +0300 (Wed, 28 Mar 2007)
New Revision: 10804

Modified:
   projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
   projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkmenuitem.c
Log:
Remove the patch that excludes submenu arrow from selection prelight

2007-03-28  Tommi Komulainen  <tommi.komulainen at nokia.com>

	* gtk/gtkmenuitem.c (gtk_menu_item_paint): Remove the patch that
	excludes the submenu arrow from selection prelight. Remove
	ARROW_PADDING and use style->xthickness instead.


Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-03-28 10:58:40 UTC (rev 10803)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-03-28 11:17:16 UTC (rev 10804)
@@ -1,3 +1,9 @@
+2007-03-28  Tommi Komulainen  <tommi.komulainen at nokia.com>
+
+	* gtk/gtkmenuitem.c (gtk_menu_item_paint): Remove the patch that
+	excludes the submenu arrow from selection prelight. Remove
+	ARROW_PADDING and use style->xthickness instead.
+
 2007-03-27  Tomas Junnonen  <tomas.junnonen at nokia.com>
 	
 	* gtk/gtkenums.h: Add HILDON_GTK_INPUT_MODE_DICTIONARY for enabling

Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkmenuitem.c
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkmenuitem.c	2007-03-28 10:58:40 UTC (rev 10803)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkmenuitem.c	2007-03-28 11:17:16 UTC (rev 10804)
@@ -770,34 +770,11 @@
 				NULL);
 
 #ifdef MAEMO_CHANGES
-          /* Don't draw the selection prelight around the arrow */
           if (menu_item->submenu)
             {
               GtkMenuItem *msi;
-              gint focus_x = x;
-              gint focus_width = width;
               GtkStateType selected_state;
 
-              if (menu_item->show_submenu_indicator)
-                {
-                  GtkRequisition child_requisition;
-                  gint arrow_size;
-
-                  /* Add 4 additional pixels of padding on both sides
-                   * of the arrow
-                   */
-#define ARROW_PADDING 4
-
-                  gtk_widget_get_child_requisition (GTK_BIN (menu_item)->child,
-                                                    &child_requisition);
-
-                  arrow_size = child_requisition.height - 2 * widget->style->ythickness;
-                  if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
-                    focus_width = x + width - arrow_size - 2 * ARROW_PADDING;
-                  else
-                    focus_x = x + arrow_size + 2 * ARROW_PADDING;
-                }
-
               /* This draws different focus depending on if it's the
                * toplevel focused menu item. All items that have
                * submenus that in turn have an item selected will be
@@ -816,7 +793,7 @@
                              selected_state,
                              selected_shadow_type,
                              area, widget, "menuitem",
-                             focus_x, y, focus_width, height);
+                             x, y, width, height);
             }
           else
 #endif /* MAEMO_CHANGES */
@@ -875,7 +852,7 @@
 	      arrow_type = GTK_ARROW_RIGHT;
 
 #ifdef MAEMO_CHANGES
-              arrow_x -= ARROW_PADDING;
+              arrow_x -= widget->style->xthickness;
 #endif /* MAEMO_CHANGES */
 	    }
 	  else
@@ -884,7 +861,7 @@
 	      arrow_type = GTK_ARROW_LEFT;
 
 #ifdef MAEMO_CHANGES
-              arrow_x += ARROW_PADDING;
+              arrow_x += widget->style->xthickness;
 #endif /* MAEMO_CHANGES */
 	    }
 


More information about the maemo-commits mailing list