summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/cyanogenmod/trebuchet/Hotseat.java5
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java10
2 files changed, 9 insertions, 6 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Hotseat.java b/src/com/cyanogenmod/trebuchet/Hotseat.java
index e6fe065..600c254 100644
--- a/src/com/cyanogenmod/trebuchet/Hotseat.java
+++ b/src/com/cyanogenmod/trebuchet/Hotseat.java
@@ -70,7 +70,7 @@ public class Hotseat extends PagedView {
mCellCount = cellCount;
}
- mVertical = mIsLandscape;
+ mVertical = hasVerticalHotseat();
LayoutInflater inflater =
(LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
@@ -118,6 +118,9 @@ public class Hotseat extends PagedView {
int getCellYFromOrder(int rank) {
return hasVerticalHotseat() ? (mCellCount - rank - 1) : 0;
}
+ int getScreenFromOrder(int screen) {
+ return hasVerticalHotseat() ? (getChildCount() - screen - 1) : screen;
+ }
@Override
protected void onFinishInflate() {
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index 7c30386..fa0c9ec 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -663,6 +663,11 @@ public class Workspace extends SmoothPagedView
final CellLayout layout;
if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
+ // Note: We do this to ensure that the hotseat is always laid out in the orientation
+ // of the hotseat in order regardless of which orientation they were added
+ y = mLauncher.getHotseat().getCellYFromOrder(x);
+ x = mLauncher.getHotseat().getCellXFromOrder(x);
+ screen = mLauncher.getHotseat().getScreenFromOrder(screen);
if (screen < 0 || screen >= mLauncher.getHotseat().getChildCount()) {
layout = (CellLayout) mLauncher.getHotseat().getLayout();
} else {
@@ -676,11 +681,6 @@ public class Workspace extends SmoothPagedView
} else if (child instanceof BubbleTextView) {
((BubbleTextView) child).setTextVisible(false);
}
-
- // Note: We do this to ensure that the hotseat is always laid out in the orientation
- // of the hotseat in order regardless of which orientation they were added
- y = mLauncher.getHotseat().getCellYFromOrder(x);
- x = mLauncher.getHotseat().getCellXFromOrder(x);
} else {
if (!mHideIconLabels) {
// Show titles if not in the hotseat