summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/raw/allapps.rs22
-rw-r--r--src/com/android/launcher2/AllAppsView.java10
2 files changed, 17 insertions, 15 deletions
diff --git a/res/raw/allapps.rs b/res/raw/allapps.rs
index 1502a55c4..abcf0dc47 100644
--- a/res/raw/allapps.rs
+++ b/res/raw/allapps.rs
@@ -291,21 +291,21 @@ void drawFrontGrid(float rowOffset, float p)
if (iconNum >= 0) {
float x = colWidth * col + (colWidth / 2);
-
- bindProgramFragment(NAMED_PFTexMip);
-
storeF(ALLOC_VP_CONSTANTS, 2, x);
- storeF(ALLOC_VP_CONSTANTS, 3, y);
+
if (state->selectedIconIndex == iconNum && !p) {
- //bindTexture(NAMED_PFTexMip, 0, state->selectedIconTexture);
- //bindTexture(NAMED_PFTexMip, 0, loadI32(ALLOC_ICON_IDS, iconNum));
- //storeF(ALLOC_VP_CONSTANTS, 0, 100.f);
- //storeF(ALLOC_VP_CONSTANTS, 1, 100.f);
- //drawSimpleMesh(NAMED_SMCell);
+ bindProgramFragment(NAMED_PFTexNearest);
+ bindTexture(NAMED_PFTexNearest, 0, state->selectedIconTexture);
+ storeF(ALLOC_VP_CONSTANTS, 0, SELECTION_TEXTURE_WIDTH_PX);
+ storeF(ALLOC_VP_CONSTANTS, 1, SELECTION_TEXTURE_HEIGHT_PX);
+ storeF(ALLOC_VP_CONSTANTS, 3, y - (SELECTION_TEXTURE_HEIGHT_PX - ICON_TEXTURE_HEIGHT_PX) * 0.5f);
+ drawSimpleMesh(NAMED_SMCell);
}
- storeF(ALLOC_VP_CONSTANTS, 0, 74.f);
- storeF(ALLOC_VP_CONSTANTS, 1, 74.f);
+ bindProgramFragment(NAMED_PFTexMip);
+ storeF(ALLOC_VP_CONSTANTS, 0, ICON_TEXTURE_WIDTH_PX);
+ storeF(ALLOC_VP_CONSTANTS, 1, ICON_TEXTURE_HEIGHT_PX);
+ storeF(ALLOC_VP_CONSTANTS, 3, y);
bindTexture(NAMED_PFTexMip, 0, loadI32(ALLOC_ICON_IDS, iconNum));
drawSimpleMesh(NAMED_SMCell);
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 424bc555e..999844d1e 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -134,10 +134,12 @@ public class AllAppsView extends RSSurfaceView
public static final int ROWS_PER_PAGE = 4;
public static final int ICON_WIDTH_PX = 64;
- public static final int ICON_TEXTURE_WIDTH_PX = 128;
+ public static final int ICON_TEXTURE_WIDTH_PX = 74;
+ public static final int SELECTION_TEXTURE_WIDTH_PX = 74 + 20;
public static final int ICON_HEIGHT_PX = 64;
- public static final int ICON_TEXTURE_HEIGHT_PX = 128;
+ public static final int ICON_TEXTURE_HEIGHT_PX = 74;
+ public static final int SELECTION_TEXTURE_HEIGHT_PX = 74 + 20;
public int SCREEN_WIDTH_PX;
public int SCREEN_HEIGHT_PX;
@@ -1075,8 +1077,8 @@ public class AllAppsView extends RSSurfaceView
mParams.save();
mState.save();
- mSelectionBitmap = Bitmap.createBitmap(Defines.ICON_TEXTURE_WIDTH_PX,
- Defines.ICON_TEXTURE_HEIGHT_PX, Bitmap.Config.ARGB_8888);
+ mSelectionBitmap = Bitmap.createBitmap(Defines.SELECTION_TEXTURE_WIDTH_PX,
+ Defines.SELECTION_TEXTURE_HEIGHT_PX, Bitmap.Config.ARGB_8888);
mSelectionCanvas = new Canvas(mSelectionBitmap);
setApps(null);