mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
improve issues with key text colors (still happening in more suggestions view)
This commit is contained in:
parent
f498d14e3b
commit
4d2686cb39
1 changed files with 6 additions and 3 deletions
|
@ -42,6 +42,7 @@ import org.dslul.openboard.inputmethod.latin.R;
|
||||||
import org.dslul.openboard.inputmethod.latin.common.Constants;
|
import org.dslul.openboard.inputmethod.latin.common.Constants;
|
||||||
import org.dslul.openboard.inputmethod.latin.settings.Settings;
|
import org.dslul.openboard.inputmethod.latin.settings.Settings;
|
||||||
import org.dslul.openboard.inputmethod.latin.settings.SettingsValues;
|
import org.dslul.openboard.inputmethod.latin.settings.SettingsValues;
|
||||||
|
import org.dslul.openboard.inputmethod.latin.suggestions.MoreSuggestionsView;
|
||||||
import org.dslul.openboard.inputmethod.latin.utils.TypefaceUtils;
|
import org.dslul.openboard.inputmethod.latin.utils.TypefaceUtils;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -402,7 +403,7 @@ public class KeyboardView extends View {
|
||||||
// so we always need to select the color filter dependent on the current key
|
// so we always need to select the color filter dependent on the current key
|
||||||
if (key.isActionKey())
|
if (key.isActionKey())
|
||||||
background.setColorFilter(accentColorFilter);
|
background.setColorFilter(accentColorFilter);
|
||||||
else if (key.getBackgroundType() == Key.BACKGROUND_TYPE_NORMAL && key.getCode() < 0 && key.getCode() != Constants.CODE_SWITCH_ALPHA_SYMBOL)
|
else if (key.getBackgroundType() == Key.BACKGROUND_TYPE_NORMAL && key.getCode() < 0 && key.getCode() != Constants.CODE_SWITCH_ALPHA_SYMBOL && key.getCode() != Constants.CODE_OUTPUT_TEXT)
|
||||||
background.clearColorFilter();
|
background.clearColorFilter();
|
||||||
else
|
else
|
||||||
background.setColorFilter(keyBgFilter);
|
background.setColorFilter(keyBgFilter);
|
||||||
|
@ -462,8 +463,10 @@ public class KeyboardView extends View {
|
||||||
if (mUserTheme) {
|
if (mUserTheme) {
|
||||||
// set key color only if not in emoji keyboard range
|
// set key color only if not in emoji keyboard range
|
||||||
if (keyboard != null
|
if (keyboard != null
|
||||||
&& (keyboard.mId.mElementId < 10 || keyboard.mId.mElementId > 26) // not showing emoji keyboard
|
&& (this.getClass() == MoreSuggestionsView.class ?
|
||||||
&& !containsEmoji(key.getLabel())) // doesn't contain emoji, necessary for more suggestions view (but doesn't find all)
|
!containsEmoji(key.getLabel()) : // doesn't contain emoji (all can happen in MoreSuggestionsView)
|
||||||
|
(keyboard.mId.mElementId < 10 || keyboard.mId.mElementId > 26) // not showing emoji keyboard (no emojis visible on main keyboard otherwise)
|
||||||
|
))
|
||||||
paint.setColorFilter(keyTextColorFilter);
|
paint.setColorFilter(keyTextColorFilter);
|
||||||
else
|
else
|
||||||
paint.setColorFilter(null);
|
paint.setColorFilter(null);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue