|
|
@ -98,8 +98,8 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View |
|
|
|
mColorMode = mPreferences.getColorModeEnabled(); |
|
|
|
mColorMode = mPreferences.getColorModeEnabled(); |
|
|
|
mColorMode &= !mDarkTheme; |
|
|
|
mColorMode &= !mDarkTheme; |
|
|
|
mIconColor = mDarkTheme ? |
|
|
|
mIconColor = mDarkTheme ? |
|
|
|
ThemeUtils.getIconDarkThemeColor(context) : |
|
|
|
ThemeUtils.getIconDarkThemeColor(context) : |
|
|
|
ThemeUtils.getIconLightThemeColor(context); |
|
|
|
ThemeUtils.getIconLightThemeColor(context); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Nullable |
|
|
|
@Nullable |
|
|
@ -184,6 +184,13 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View |
|
|
|
mBus.unregister(this); |
|
|
|
mBus.unregister(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void tabsInitialized() { |
|
|
|
|
|
|
|
if (mTabsAdapter != null) { |
|
|
|
|
|
|
|
mTabsAdapter.notifyDataSetChanged(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void reinitializePreferences() { |
|
|
|
public void reinitializePreferences() { |
|
|
|
Activity activity = getActivity(); |
|
|
|
Activity activity = getActivity(); |
|
|
|
if (activity == null) { |
|
|
|
if (activity == null) { |
|
|
@ -193,8 +200,8 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View |
|
|
|
mColorMode = mPreferences.getColorModeEnabled(); |
|
|
|
mColorMode = mPreferences.getColorModeEnabled(); |
|
|
|
mColorMode &= !mDarkTheme; |
|
|
|
mColorMode &= !mDarkTheme; |
|
|
|
mIconColor = mDarkTheme ? |
|
|
|
mIconColor = mDarkTheme ? |
|
|
|
ThemeUtils.getIconDarkThemeColor(activity) : |
|
|
|
ThemeUtils.getIconDarkThemeColor(activity) : |
|
|
|
ThemeUtils.getIconLightThemeColor(activity); |
|
|
|
ThemeUtils.getIconLightThemeColor(activity); |
|
|
|
if (mTabsAdapter != null) { |
|
|
|
if (mTabsAdapter != null) { |
|
|
|
mTabsAdapter.notifyDataSetChanged(); |
|
|
|
mTabsAdapter.notifyDataSetChanged(); |
|
|
|
} |
|
|
|
} |
|
|
@ -356,7 +363,7 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View |
|
|
|
|
|
|
|
|
|
|
|
public Bitmap getDesaturatedBitmap(@NonNull Bitmap favicon) { |
|
|
|
public Bitmap getDesaturatedBitmap(@NonNull Bitmap favicon) { |
|
|
|
Bitmap grayscaleBitmap = Bitmap.createBitmap(favicon.getWidth(), |
|
|
|
Bitmap grayscaleBitmap = Bitmap.createBitmap(favicon.getWidth(), |
|
|
|
favicon.getHeight(), Bitmap.Config.ARGB_8888); |
|
|
|
favicon.getHeight(), Bitmap.Config.ARGB_8888); |
|
|
|
|
|
|
|
|
|
|
|
Canvas c = new Canvas(grayscaleBitmap); |
|
|
|
Canvas c = new Canvas(grayscaleBitmap); |
|
|
|
if (mColorMatrix == null || mFilter == null || mPaint == null) { |
|
|
|
if (mColorMatrix == null || mFilter == null || mPaint == null) { |
|
|
|