Implement composer tweaks to allow for better contrast.

This commit is contained in:
Alex Hart
2022-06-16 13:34:42 -03:00
committed by Greyson Parrelli
parent b6d1af3760
commit a593bc0b7a
5 changed files with 11 additions and 18 deletions

View File

@@ -329,11 +329,11 @@ public class InputPanel extends LinearLayout
final int textHintColor;
if (enabled) {
iconTint = getContext().getResources().getColor(R.color.signal_colorNeutralInverse);
textColor = getContext().getResources().getColor(R.color.signal_colorNeutralInverse);
textHintColor = getContext().getResources().getColor(R.color.signal_colorNeutralVariantInverse);
iconTint = getContext().getResources().getColor(R.color.signal_colorOnSurface);
textColor = getContext().getResources().getColor(R.color.signal_colorOnSurface);
textHintColor = getContext().getResources().getColor(R.color.signal_colorOnSurfaceVariant);
setBackground(new ColorDrawable(getContext().getResources().getColor(R.color.wallpaper_compose_background)));
setBackground(null);
composeContainer.setBackground(Objects.requireNonNull(ContextCompat.getDrawable(getContext(), R.drawable.compose_background_wallpaper)));
quickAudioToggle.setColorFilter(iconTint);
quickCameraToggle.setColorFilter(iconTint);

View File

@@ -2277,6 +2277,8 @@ public class ConversationParentFragment extends Fragment
toolbar.setTitleTextColor(toolbarTextAndIconColor);
setToolbarActionItemTint(toolbar, toolbarTextAndIconColor);
WindowUtil.setNavigationBarColor(requireActivity().getWindow(), 0);
WindowUtil.setLightNavigationBar(requireActivity().getWindow());
} else {
wallpaper.setImageDrawable(null);
wallpaperDim.setVisibility(View.GONE);
@@ -2289,6 +2291,9 @@ public class ConversationParentFragment extends Fragment
int toolbarTextAndIconColor = getResources().getColor(R.color.signal_colorOnSurface);
toolbar.setTitleTextColor(toolbarTextAndIconColor);
setToolbarActionItemTint(toolbar, toolbarTextAndIconColor);
WindowUtil.setNavigationBarColor(requireActivity().getWindow(), ContextCompat.getColor(requireContext(), R.color.signal_colorBackground));
WindowUtil.setLightNavigationBarFromTheme(requireActivity());
}
fragment.onWallpaperChanged(chatWallpaper);
messageRequestBottomView.setWallpaperEnabled(chatWallpaper != null);