summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Marble <drmarble1@gmail.com>2013-05-26 15:11:23 -0500
committerDavid Marble <drmarble1@gmail.com>2013-05-27 10:21:56 -0500
commitd52a2fe2239b3ca10af5db532650184b877c2141 (patch)
tree3b4eb292dcf2048baff2a46f9c82c0e55170aeb2 /src
parent8752c0f0fc480f4f65d108005c1f624c3491aeeb (diff)
downloadpackages_apps_trebuchet-d52a2fe2239b3ca10af5db532650184b877c2141.zip
packages_apps_trebuchet-d52a2fe2239b3ca10af5db532650184b877c2141.tar.gz
packages_apps_trebuchet-d52a2fe2239b3ca10af5db532650184b877c2141.tar.bz2
Fix for low aspect ratio (4x3) tablets.
The recent changes (http://review.cyanogenmod.org/#/c/42991/) cause problems for tablets with a 4x3 screen such as Tenderloin. The icon spacing is not calculated correctly. This is stated in the code for Workspace.java at line 441: "//TODO: This code currently fails on tablets with an aspect ratio < 1.3." This change fixes that failure for such tablets. Besides setting the grid size, stretching is required to get useable screens. This reenables stretching as well as grid size setting if the maintainer has specified <bool name="config_workspaceTabletGrid">true</bool> in an overlay. There is no change to the default behavior. Change-Id: I5863ba4120d1e27773a58be2c336c266c05b838f
Diffstat (limited to 'src')
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java5
-rw-r--r--src/com/cyanogenmod/trebuchet/preference/Preferences.java8
2 files changed, 7 insertions, 6 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index 0213bd8..065ac71 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -392,8 +392,9 @@ public class Workspace extends PagedView
}
mStretchScreens = PreferencesProvider.Interface.Homescreen.getStretchScreens();
- // Large screen has calculated dimensions always
- if (LauncherApplication.isScreenLarge()) {
+ // Large screen has calculated dimensions always, unless specified by config_workspaceTabletGrid option
+ boolean workspaceTabletGrid = getResources().getBoolean(R.bool.config_workspaceTabletGrid);
+ if (LauncherApplication.isScreenLarge() && workspaceTabletGrid == false) {
mStretchScreens = false;
}
mShowSearchBar = PreferencesProvider.Interface.Homescreen.getShowSearchBar();
diff --git a/src/com/cyanogenmod/trebuchet/preference/Preferences.java b/src/com/cyanogenmod/trebuchet/preference/Preferences.java
index 7843110..cf90b17 100644
--- a/src/com/cyanogenmod/trebuchet/preference/Preferences.java
+++ b/src/com/cyanogenmod/trebuchet/preference/Preferences.java
@@ -133,10 +133,10 @@ public class Preferences extends PreferenceActivity
if (grid != null) {
general.removePreference(grid);
}
- }
- Preference stretch = findPreference("ui_homescreen_stretch_screens");
- if (stretch != null) {
- general.removePreference(stretch);
+ Preference stretch = findPreference("ui_homescreen_stretch_screens");
+ if (stretch != null) {
+ general.removePreference(stretch);
+ }
}
}
}