Index: wp-admin/menu.php
===================================================================
--- wp-admin/menu.php	(revision 21356)
+++ wp-admin/menu.php	(working copy)
@@ -100,11 +100,13 @@
 		continue;
 	$ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first.
 	$ptype_for_id = sanitize_html_class( $ptype );
-	if ( is_string( $ptype_obj->menu_icon ) ) {
-		$menu_icon   = esc_url( $ptype_obj->menu_icon );
+	if ( $ptype_obj->menu_icon && ! empty( $ptype_obj->menu_icon ) ) {
+		$menu_icon   = 'div';
+		$has_menu_icon = is_array( $ptype_obj->menu_icon ) ? ' wp-has-menu-sprite ' : ' wp-has-menu-image ';
 		$ptype_class = $ptype_for_id;
 	} else {
 		$menu_icon   = 'div';
+		$has_menu_icon = '';
 		$ptype_class = 'post';
 	}
 
@@ -113,7 +115,7 @@
 	while ( isset($menu[$ptype_menu_position]) || in_array($ptype_menu_position, $core_menu_positions) )
 		$ptype_menu_position++;
 
-	$menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-' . $ptype_class, 'menu-posts-' . $ptype_for_id, $menu_icon );
+	$menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-' . $ptype_class . $has_menu_icon, 'menu-posts-' . $ptype_for_id, $menu_icon );
 	$submenu["edit.php?post_type=$ptype"][5]  = array( $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts,  "edit.php?post_type=$ptype");
 	$submenu["edit.php?post_type=$ptype"][10]  = array( $ptype_obj->labels->add_new, $ptype_obj->cap->edit_posts, "post-new.php?post_type=$ptype" );
 
@@ -236,3 +238,120 @@
 	);
 
 require_once(ABSPATH . 'wp-admin/includes/menu.php');
+
+add_action( 'admin_head', '_admin_menu_icons_css' );
+function _admin_menu_icons_css() {
+	$css = '';
+
+	// Loop through all available post types
+	foreach ( (array) get_post_types( array( 'show_ui' => true, '_builtin' => false, 'show_in_menu' => true ) ) as $ptype ) {
+		$ptype_obj = get_post_type_object( $ptype );
+
+		// Check if it should be a submenu.
+		if ( $ptype_obj->show_in_menu !== true )
+			continue;
+
+		// If no menu icon is set don't do anything.
+		if ( ! $ptype_obj->menu_icon || empty( $ptype_obj->menu_icon ) )
+			continue;
+
+		// Will use this as a class name later.
+		$ptype_slug = sanitize_html_class( $ptype );
+		$menu_icon = $ptype_obj->menu_icon;
+
+		// Back-compat, transforms to new-style menu icon.
+		if ( ! is_array( $menu_icon ) ) {
+			$menu_icon = array( 
+				'image_url' => $menu_icon,
+				'background_size' => '16px 16px',
+				'background_position' => '7px 7px',
+			);
+		}
+
+		$background_image = '';
+		$background_size = '';
+		$background_position = '';
+		$background_position_hover = '';
+
+		if ( ! isset( $menu_icon['regular'] ) )
+			$menu_icon = array( 'regular' => $menu_icon );
+
+		$regular = $menu_icon['regular'];
+
+		if ( isset( $regular['image_url'] ) )
+			$background_image = sprintf( "background-image: url('%s');", esc_url( $regular['image_url'] ) );
+
+		if ( isset( $regular['background_size'] ) ) {
+			$xy = array_map( 'intval', preg_split( '/[\s,]+/', $regular['background_size'] ) );
+			if ( count( $xy ) == 2 )
+				$background_size = sprintf( "background-size: %dpx %dpx;", $xy[0], $xy[1] );
+		}
+
+		if ( isset( $regular['background_position'] ) ) {
+			$xy = array_map( 'intval', preg_split( '/[\s,]+/', $regular['background_position'] ) );
+			if ( count( $xy ) == 2 )
+				$background_position = sprintf( "background-position: %dpx %dpx;", $xy[0], $xy[1] );
+		}
+
+		if ( isset( $regular['background_position_hover'] ) ) {
+			$xy = array_map( 'intval', preg_split( '/[\s,]+/', $regular['background_position_hover'] ) );
+			if ( count( $xy ) == 2 )
+				$background_position_hover = sprintf( "background-position: %dpx %dpx;", $xy[0], $xy[1] );
+		}
+
+		$css .= "
+		#adminmenu li.menu-icon-{$ptype_slug} .wp-menu-image {
+			$background_image
+			$background_size
+			$background_position
+		}
+		#adminmenu li.menu-icon-{$ptype_slug}:hover .wp-menu-image {
+			$background_position_hover
+		}";
+
+		// Hidpi
+		$hidpi = isset( $menu_icon['2x'] ) ? $menu_icon['2x'] : array();
+
+		$hidpi_background_image = '';
+		$hidpi_background_size = '';
+		$hidpi_background_position = '';
+		$hidpi_background_position_hover = '';
+
+		if ( isset( $hidpi['image_url'] ) )
+			$hidpi_background_image = sprintf( "background-image: url('%s');", esc_url( $hidpi['image_url'] ) );
+
+		if ( isset( $hidpi['background_size'] ) ) {
+			$xy = array_map( 'intval', preg_split( '/[\s,]+/', $hidpi['background_size'] ) );
+			if ( count( $xy ) == 2 )
+				$hidpi_background_size = sprintf( "background-size: %dpx %dpx;", $xy[0], $xy[1] );
+		}
+
+		if ( isset( $hidpi['background_position'] ) ) {
+			$xy = array_map( 'intval', preg_split( '/[\s,]+/', $hidpi['background_position'] ) );
+			if ( count( $xy ) == 2 )
+				$hidpi_background_position = sprintf( "background-position: %dpx %dpx;", $xy[0], $xy[1] );
+		}
+
+		if ( isset( $hidpi['background_position_hover'] ) ) {
+			$xy = array_map( 'intval', preg_split( '/[\s,]+/', $hidpi['background_position_hover'] ) );
+			if ( count( $xy ) == 2 )
+				$hidpi_background_position_hover = sprintf( "background-position: %dpx %dpx;", $xy[0], $xy[1] );
+		}
+
+		if ( $hidpi ) {
+			$css .= "@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
+				#adminmenu li.menu-icon-{$ptype_slug} .wp-menu-image {
+					$hidpi_background_image
+					$hidpi_background_position
+					$hidpi_background_size
+				}
+				#adminmenu li.menu-icon-{$ptype_slug}:hover .wp-menu-image {
+					$hidpi_background_position_hover
+				}
+			}";
+		}
+	} // foreach
+
+	if ( strlen( $css ) > 0 )
+		echo "<style>$css</style>";
+}
\ No newline at end of file
Index: wp-admin/css/wp-admin.dev.css
===================================================================
--- wp-admin/css/wp-admin.dev.css	(revision 21356)
+++ wp-admin/css/wp-admin.dev.css	(working copy)
@@ -1574,15 +1574,13 @@
 	border-style: solid none;
 }
 
-#adminmenu .wp-menu-image img {
-	float: left;
-	padding: 5px 0 0 2px;
+#adminmenu li.wp-has-menu-image .wp-menu-image {
 	opacity: 0.6;
 	filter: alpha(opacity=60);
 }
 
-#adminmenu li.menu-top:hover .wp-menu-image img,
-#adminmenu li.wp-has-current-submenu .wp-menu-image img {
+#adminmenu li.wp-has-menu-image.menu-top:hover .wp-menu-image,
+#adminmenu li.wp-has-menu-image.wp-has-current-submenu .wp-menu-image {
 	opacity: 1;
 	filter: alpha(opacity=100);
 }
