diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable-hdpi/all_apps_button.png | bin | 8371 -> 3200 bytes | |||
-rw-r--r-- | res/layout-port/launcher.xml | 32 | ||||
-rw-r--r-- | res/raw/rollo.c | 24 |
3 files changed, 27 insertions, 29 deletions
diff --git a/res/drawable-hdpi/all_apps_button.png b/res/drawable-hdpi/all_apps_button.png Binary files differindex 945bf9314..bb842785b 100644 --- a/res/drawable-hdpi/all_apps_button.png +++ b/res/drawable-hdpi/all_apps_button.png diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml index edfa9f11d..f6f383f0a 100644 --- a/res/layout-port/launcher.xml +++ b/res/layout-port/launcher.xml @@ -48,39 +48,29 @@ </com.android.launcher2.Workspace> - <LinearLayout - android:id="@+id/buttons" - android:layout_width="fill_parent" - android:layout_height="56dip" - android:layout_gravity="bottom" - - android:gravity="right" - > - - <com.android.launcher2.HandleView - android:id="@+id/all_apps_button" - android:layout_width="@dimen/button_bar_height" - android:layout_height="@dimen/button_bar_height" - - android:focusable="true" - android:clickable="true" + <com.android.launcher2.HandleView + android:id="@+id/all_apps_button" + android:layout_width="wrap_content" + android:layout_height="@dimen/button_bar_height" + android:layout_gravity="bottom|center_horizontal" - android:scaleType="center" - android:src="@drawable/all_apps_button" + android:focusable="true" + android:clickable="true" - launcher:direction="horizontal" /> - </LinearLayout> + android:scaleType="center" + android:src="@drawable/all_apps_button" + launcher:direction="horizontal" /> <com.android.launcher2.DeleteZone android:id="@+id/delete_zone" android:layout_width="wrap_content" android:layout_height="49dip" + android:layout_gravity="bottom|center_horizontal" android:scaleType="center" android:src="@drawable/ic_delete" android:background="@drawable/delete_zone_selector" - android:layout_gravity="bottom|center_horizontal" android:visibility="invisible" launcher:direction="horizontal" /> diff --git a/res/raw/rollo.c b/res/raw/rollo.c index 283d89da8..e9c31b1ec 100644 --- a/res/raw/rollo.c +++ b/res/raw/rollo.c @@ -34,6 +34,7 @@ #define STATE_SELECTED_ICON_TEXTURE 10 #define STATE_VISIBLE 11 +#define STATE_ZOOM 12 // Drawing constants, should be parameters ====== #define VIEW_ANGLE 1.28700222f @@ -67,6 +68,8 @@ draw_page(int icon, int lastIcon, float centerAngle) int row; int col; + float scale = 1.0f - loadI32(ALLOC_STATE, STATE_ZOOM)/100000.0f; + float iconTextureWidth = ICON_WIDTH_PX / (float)ICON_TEXTURE_WIDTH_PX; float iconTextureHeight = ICON_HEIGHT_PX / (float)ICON_TEXTURE_HEIGHT_PX; @@ -110,6 +113,7 @@ draw_page(int icon, int lastIcon, float centerAngle) float centerX = sine * RADIUS; float centerZ = cosine * RADIUS; + centerZ -= (7*scale); float iconLeftX = centerX - (cosine * farIconTextureSize * .5); float iconRightX = centerX + (cosine * farIconTextureSize * .5); @@ -133,15 +137,17 @@ draw_page(int icon, int lastIcon, float centerAngle) iconLeftX, iconTextureBottom, iconLeftZ, 0.0f, 1.0f); // label - float labelLeftX = centerX - farLabelWidth * 0.5f; - float labelRightX = centerX + farLabelWidth * 0.5f; + if (scale <= 1.04f) { + float labelLeftX = centerX - farLabelWidth * 0.5f; + float labelRightX = centerX + farLabelWidth * 0.5f; - bindTexture(NAMED_PF, 0, loadI32(ALLOC_LABEL_IDS, icon)); - drawQuadTexCoords( - labelLeftX, labelTop, centerZ, 0.0f, 0.0f, - labelRightX, labelTop, centerZ, labelTextureWidth, 0.0f, - labelRightX, labelBottom, centerZ, labelTextureWidth, labelTextureHeight, - labelLeftX, labelBottom, centerZ, 0.0f, labelTextureHeight); + bindTexture(NAMED_PF, 0, loadI32(ALLOC_LABEL_IDS, icon)); + drawQuadTexCoords( + labelLeftX, labelTop, centerZ, 0.0f, 0.0f, + labelRightX, labelTop, centerZ, labelTextureWidth, 0.0f, + labelRightX, labelBottom, centerZ, labelTextureWidth, labelTextureHeight, + labelLeftX, labelBottom, centerZ, 0.0f, labelTextureHeight); + } angle += columnGutterAngle + iconWidthAngle; icon++; @@ -269,6 +275,8 @@ main(int launchID) scrollXPx = loadF(ALLOC_STATE, STATE_FLING_END_POS); done = 1; } + } else { + done = 1; } // Clamp |