@@ -602,7 +602,7 @@ private static int DrawPagedFavorites(Rect listRect, Event evt)
602602 }
603603
604604 if ( ! ( _isRowReorderDrag && itemIndex == _dragSourceIndex ) )
605- DrawRowVisual ( item , rowRect , localMouse ) ;
605+ DrawRowVisual ( item , rowRect , localMouse , pageSlot ) ;
606606 rowIndex ++ ;
607607 }
608608 GUI . EndGroup ( ) ;
@@ -846,7 +846,7 @@ private static void DrawRow(FavoriteItem item, int itemIndex, Rect rowRect, Even
846846 }
847847 }
848848
849- private static void DrawRowVisual ( FavoriteItem item , Rect rowRect , Vector2 mousePosition )
849+ private static void DrawRowVisual ( FavoriteItem item , Rect rowRect , Vector2 mousePosition , int zebraIndex = - 1 )
850850 {
851851 bool isHover = rowRect . Contains ( mousePosition ) ;
852852 bool isSelected = IsItemSelected ( item ) ;
@@ -856,6 +856,23 @@ private static void DrawRowVisual(FavoriteItem item, Rect rowRect, Vector2 mouse
856856 bool hasFolderColor = isFolder && ProjectFolderStyleManager . TryGetColorForFolderPath ( itemPath , out folderColor ) ;
857857 bool drawRowTint = hasFolderColor && NMPSettings . ProjectRowColors ;
858858 bool drawIconTint = hasFolderColor && NMPSettings . ProjectFolderColors ;
859+ bool drawZebra = NMPSettings . ProjectZebra && ! drawRowTint ;
860+ if ( drawZebra )
861+ {
862+ bool isOdd ;
863+ if ( zebraIndex >= 0 )
864+ isOdd = ( zebraIndex & 1 ) != 0 ;
865+ else
866+ isOdd = Mathf . RoundToInt ( rowRect . y / Mathf . Max ( 1f , rowRect . height ) ) % 2 != 0 ;
867+
868+ if ( isOdd )
869+ {
870+ var zebraColor = EditorGUIUtility . isProSkin
871+ ? new Color ( 1f , 1f , 1f , 0.07f )
872+ : new Color ( 0f , 0f , 0f , 0.07f ) ;
873+ EditorGUI . DrawRect ( rowRect , zebraColor ) ;
874+ }
875+ }
859876
860877 if ( drawRowTint )
861878 {
0 commit comments