summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/trebuchet/Workspace.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/Workspace.java')
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index ac07d6cf9..0321e2b3f 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -305,6 +305,7 @@ public class Workspace extends PagedView
// Preferences
private int mNumberHomescreens;
private int mDefaultHomescreen;
+ private boolean mStretchScreens;
private boolean mShowSearchBar;
private boolean mShowHotseat;
private boolean mHideIconLabels;
@@ -392,6 +393,12 @@ public class Workspace extends PagedView
mDefaultHomescreen = mNumberHomescreens / 2;
}
+ mStretchScreens = PreferencesProvider.Interface.Homescreen.getStretchScreens();
+ // 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();
mShowHotseat = PreferencesProvider.Interface.Dock.getShowDock();
mHideIconLabels = PreferencesProvider.Interface.Homescreen.getHideIconLabels();
@@ -524,7 +531,9 @@ public class Workspace extends PagedView
(LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
for (int i = 0; i < mNumberHomescreens; i++) {
CellLayout screen = (CellLayout) inflater.inflate(R.layout.workspace_screen, null);
- screen.setCellGaps(-1, -1);
+ if (mStretchScreens) {
+ screen.setCellGaps(-1, -1);
+ }
addView(screen);
}