diff options
-rw-r--r-- | res/values-land/config.xml | 2 | ||||
-rw-r--r-- | res/values-sw340dp-port/config.xml | 21 | ||||
-rw-r--r-- | res/values-sw720dp/config.xml | 2 | ||||
-rw-r--r-- | res/values/config.xml | 2 | ||||
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | res/xml/preferences.xml | 4 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Workspace.java | 3 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/preference/PreferencesProvider.java | 4 |
8 files changed, 15 insertions, 27 deletions
diff --git a/res/values-land/config.xml b/res/values-land/config.xml index fc20456..60052f0 100644 --- a/res/values-land/config.xml +++ b/res/values-land/config.xml @@ -18,8 +18,6 @@ <!-- Workspace --> <!-- Whether or not the drop targets drop down as opposed to fade in --> <bool name="config_useDropTargetDownTransition">false</bool> - <!-- Whether or not to fade the side pages --> - <bool name="config_workspaceFadeAdjacentScreens">false</bool> <!-- Folder max bounds and max number of items. Note: folder_max_count_x * folder_max_count_y >= folder_max_num_items. --> diff --git a/res/values-sw340dp-port/config.xml b/res/values-sw340dp-port/config.xml deleted file mode 100644 index d31ee59..0000000 --- a/res/values-sw340dp-port/config.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<resources> -<!-- Workspace --> - <!-- Whether or not to fade the side pages --> - <bool name="config_workspaceFadeAdjacentScreens">false</bool> -</resources> diff --git a/res/values-sw720dp/config.xml b/res/values-sw720dp/config.xml index 7c8d3d2..a0954a0 100644 --- a/res/values-sw720dp/config.xml +++ b/res/values-sw720dp/config.xml @@ -21,7 +21,7 @@ <!-- Whether or not the drop targets drop down as opposed to fade in --> <bool name="config_useDropTargetDownTransition">true</bool> <!-- Whether or not to fade the side pages --> - <bool name="config_workspaceFadeAdjacentScreens">true</bool> + <bool name="config_workspaceDefualtFadeInAdjacentScreens">true</bool> <!-- Camera distance for the overscroll effect --> <integer name="config_cameraDistance">18000</integer> diff --git a/res/values/config.xml b/res/values/config.xml index 8759232..114efd1 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -41,7 +41,7 @@ <!-- Whether or not the drop targets drop down as opposed to fade in --> <bool name="config_useDropTargetDownTransition">true</bool> <!-- Whether or not to fade the side pages --> - <bool name="config_workspaceFadeAdjacentScreens">false</bool> + <bool name="config_workspaceDefualtFadeInAdjacentScreens">false</bool> <!-- Whether to show outlines on the screens when scrolling --> <bool name="config_workspaceDefaultShowOutlines">false</bool> diff --git a/res/values/strings.xml b/res/values/strings.xml index 6728f8a..22a4f9c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -328,8 +328,10 @@ s --> <string name="preferences_interface_homescreen_scrolling_scroll_wallpaper_summary">Scroll wallpaper when scrolling homescreens</string> <string name="preferences_interface_homescreen_scrolling_wallpaper_hack_title">Wallpaper quick render</string> <string name="preferences_interface_homescreen_scrolling_wallpaper_hack_summary">Use wallpaper hack that increases smoothness on static image wallpapers</string> + <string name="preferences_interface_homescreen_scrolling_fade_adjacent_screens_title">Fade side screens</string> + <string name="preferences_interface_homescreen_scrolling_fade_adjacent_screens_summary">Fade the side screens when scrolling homescreens</string> <string name="preferences_interface_homescreen_scrolling_show_outlines_title">Show outlines</string> - <string name="preferences_interface_homescreen_scrolling_show_outlines_summary">Show outlines when scrolling homescreens</string> + <string name="preferences_interface_homescreen_scrolling_show_outlines_summary">Show screen outlines when scrolling homescreens</string> <string name="preferences_interface_homescreen_indicator_category">Indicator</string> <string name="preferences_interface_homescreen_indicator_enable_title">Show page indicator</string> <string name="preferences_interface_homescreen_indicator_enable_summary">Show current page indicator at the bottom of the screen</string> diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 46b6c24..1eb848e 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -78,6 +78,10 @@ android:title="@string/preferences_interface_homescreen_scrolling_wallpaper_hack_title" android:summary="@string/preferences_interface_homescreen_scrolling_wallpaper_hack_summary" android:defaultValue="false" /> + <CheckBoxPreference android:key="ui_homescreen_scrolling_fade_adjacent_screens" + android:title="@string/preferences_interface_homescreen_scrolling_fade_adjacent_screens_title" + android:summary="@string/preferences_interface_homescreen_scrolling_fade_adjacent_screens_summary" + android:defaultValue="@bool/config_workspaceDefualtFadeInAdjacentScreens" /> <CheckBoxPreference android:key="ui_homescreen_scrolling_show_outlines" android:title="@string/preferences_interface_homescreen_scrolling_show_outlines_title" android:summary="@string/preferences_interface_homescreen_scrolling_show_outlines_summary" diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index 736a26e..51a21a5 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -315,7 +315,6 @@ public class Workspace extends SmoothPagedView mLauncher = (Launcher) context; final Resources res = getResources(); - mWorkspaceFadeInAdjacentScreens = res.getBoolean(R.bool.config_workspaceFadeAdjacentScreens); mFadeInAdjacentScreens = false; mWallpaperManager = WallpaperManager.getInstance(context); @@ -373,6 +372,8 @@ public class Workspace extends SmoothPagedView mShowDockDivider = PreferencesProvider.Interface.Homescreen.Indicator.getShowDockDivider(context); mShowOutlines = PreferencesProvider.Interface.Homescreen.Scrolling.getShowOutlines(context, res.getBoolean(R.bool.config_workspaceDefaultShowOutlines)); + mFadeInAdjacentScreens = PreferencesProvider.Interface.Homescreen.Scrolling.getFadeInAdjacentScreens(context, + res.getBoolean(R.bool.config_workspaceDefualtFadeInAdjacentScreens)); initWorkspace(); checkWallpaper(); diff --git a/src/com/cyanogenmod/trebuchet/preference/PreferencesProvider.java b/src/com/cyanogenmod/trebuchet/preference/PreferencesProvider.java index 3263cce..6e4f536 100644 --- a/src/com/cyanogenmod/trebuchet/preference/PreferencesProvider.java +++ b/src/com/cyanogenmod/trebuchet/preference/PreferencesProvider.java @@ -86,6 +86,10 @@ public final class PreferencesProvider { final SharedPreferences preferences = context.getSharedPreferences(PREFERENCES_KEY, 0); return preferences.getBoolean("ui_homescreen_scrolling_wallpaper_hack", false); } + public static boolean getFadeInAdjacentScreens(Context context, boolean def) { + final SharedPreferences preferences = context.getSharedPreferences(PREFERENCES_KEY, 0); + return preferences.getBoolean("ui_homescreen_scrolling_fade_adjacent_screens", def); + } public static boolean getShowOutlines(Context context, boolean def) { final SharedPreferences preferences = context.getSharedPreferences(PREFERENCES_KEY, 0); return preferences.getBoolean("ui_homescreen_scrolling_show_outlines", def); |