-
-
Notifications
You must be signed in to change notification settings - Fork 214
Add white base themes for use with custom themes #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks, this looks really good and works nicely for theming.
Initially I thought that would not be necessary, but actually the white theme looks really awkward. I agree that it's better to hide it from selection. But: It may not be necessary to remove it (if it turns out to be complicated... didn't check) Then again, this idea is nothing that needs to be done now, though proabably I'll start playing with it once this PR is merged. |
|
Space bar in no-border base theme is now like others no-border themes 😉 I'll remove the base theme only to make sure everything is working properly. Normally, it is not complicated to remove it. |
Ok, I hadn't checked how to remove it. This is almost ready, now the only things missing are the actual themes and a way to select them. |
|
Now, base theme is removed from the list of theme variants and the user theme still follows base theme. In my opinion, everything is now finished to be merged. Let me know if it's ok for you too.
I will open an other PR because I am having trouble implementing my themes. Do you have any clues for me please? Thanks in advance. |
|
Yes, that's the idea. You can modify it with if (!KeyboardTheme.getIsCustom(keyboardThemeId))
return new Colors(keyboardThemeId, configuration.uiMode & Configuration.UI_MODE_NIGHT_MASK);
+
+ final Colors customTheme = getCustomTheme(prefs.getInt(Settings.PREF_CUSTOM_THEME_ID, 0)); // you can also use a string instead of int, maybe this is easier if you add a lot of themes
+ if (customTheme != null)
+ return customTheme;
// we have a custom theme, which is user only (at the moment)and define a static Colors getCustomTheme(final int themeId) {
switch (themeId) {
// pre-define themes here
case 1:
return new Colors(1, 2, 3, 4, 5, 6, 7);
case 2:
return new Colors(Color.BLUE, Color.WHITE, Color.LTGRAY, Color.DKGRAY, Color.LTGRAY, Color.BLACK, Color.BLACK);
case 3:
// https://developer.android.com/reference/android/graphics/Color#parseColor(java.lang.String)
return new Colors(
Color.parseColor("#aa00aa"),
Color.parseColor("aqua"),
Color.parseColor("lime"),
Color.parseColor("red"),
Color.parseColor("#1287bb"),
Color.parseColor("#cc3314"),
Color.parseColor("#ff3344")
);
default:
return null;
}
}[edit: you could also put the colors in resources, and provide some Then you can use Here I'm not sure whether you can easily integrate the themes into the current theme selection. If you don't find a way, it's ok to just add a new preference. |
|
Thank you very much for your help but unfortunately I still can't integrate a predefined theme. Too bad; even if this part is too complicated for me, I will try to help on other topics. In the meantime, what is certain is that this PR can be merged and that is the main thing. |
|
@BlackyHawky no problem. I will merge your PR and implement some basic way switching similar to what I wrote above. Btw does the holo white (or holo user) theme work for you? When I started working on the colors more than a year ago, I'm sure it was ok, but now I always see holo dark, no matter what I choose. |
@Helium314 Thanks a lot again.
I find these themes old so I never use them. 😅 With Holo User, we are limited on the choice of background colors and on the keyboard keys certainly due to the fact that they are defined by png. 🤔 |
|
Doesn't really work, looks like for me. But I guess it doesn't matter too much, probably almost no one uses them.
That should not matter too much, because the colors get applied using color filters. But to work on a dark background, the filters would need to be adjusted. |
|
I adjusted the theming stuff, now you have a "theme variant new" switch in the appearance settings. There are still some minor issues with the adjusted themes (just search for "todo" in the commit...)
|
|
Thank you so much! I've read your update and I can confirm that I couldn't have done it 😅 If I have time today, I'd gladly work on it again. I'll keep you informed through a new draft PR. Thanks again. |
|
@Helium314 So I created 2 themes to see: Indigo and Brown. After those well-deserved compliments, I'd like to know:
|
I try to stay in line with the original themes as much as possible, specifically here I switched several times, still not sure which to use...
Transparent causes issues, as it's impossible to apply a color filter to transparent (well, it's possible, but it will remain transparent) I did some adjustments today (before reading thsi), will commit and upload them. |
|
Also, can you upload a branch with the changes you did? Just so I can test whether I can reproduce the ugly more suggestions view on my device. |
I can now announce that these both "Todo" are 100% solved. 👍 Now both files "themes-lxx-base" and "themes-lxx-base-border" are consistent. All my edits are here. I can do a PR if you want to merge this solution. Of course, I leave it to you to decide. FYI: I tried to replace |
|
It's really weird that not "properly" adding a theme causes this issue, and that |
|
That's how it looks like in OpenBoard too |
I managed to implement HSL properties to colors. Another important thing: the default themes are not impacted and if you see a difference, it will only be very minor.
By using the HSL properties, the 2 functions below no longer use white or black to adjust the hue but use the color associated with the keyboard background and a factor to either lighten or darken the color. In my opinion, this is another good step forward on the improvement of themes. Screenshots below: left = without HSL // right = with HSL FYI: for Indigo Theme and User Theme don't take into account colors of functional key because I modified the code to be able to modify their colors but the principle is the same for the other key popups. @Helium314 : as usual, if you want I'll create a branch so you can test it out and a new PR if you agree with this proposal. |
|
@BlackyHawky, thanks. It's perfectly rounded now. |
@RHJihan Great news! PR will be created today. 😉 |
|
Thanks for noticing and fixing the rounding issue @RHJihan & @BlackyHawky . For me it makes no difference, on my tiny screen it's very hard to notice the change.
This is great (though not surprising, as they barely have a color anyway).
I think you can just do a PR straight away, this definitely is a good improvement. |
Everything is done here: #57 👍 |
|
@Helium314 Can I do a PR so that we have the possibility to change the color of the functional keys? |
|
It's somewhere on my todo list, but if you would like to do it, go ahead. They should use key text color, just like the clipboard button. |
PR #72 created
We seem to have misunderstood each other. 😅 Sorry if I misspoke. My request concerns background of functional keys. |
|
Oh, sorry.
is still the current state. |
|
I don't know what causing this. These punctuation suggestions are appearing from my last build which includes 4705920.
|
Punctuation marks appear only when Next-word suggestion is toggle-off in Correction settings. |
|
Not sure where the color is set here, probaly need to follow what |
PR #75 created and problem solved 👍 However, I couldn't find the line of code to do the same thing with the 3 small dots. If anyone has any ideas. Finally, do you think we should do the same thing with the language color on the space bar? |
Maybe that's in some layout file |
Which same thing do you mean? |
I'm tired of looking 🤣
Oops. I said something stupid. The color of the space bar text is linked to the color of the hint text so there's nothing to change. Sorry. |
I know that feeling too well... |
@Helium314 I did it!!! 🤣🤣🤣 (#78) |
|
@Helium314
|
|
Possibly I missed a place where |
|
I'm really unlucky today. I couldn't find anything wrong with that either. |
|
fixed in 0b718f5 |
Only this ? I'm really dumb... |












This PR is the rest of this one #16.
Currently, this includes added base and base border theme to allow full color range for user theme.
@Helium314 can you tell me if this suits you again?
If so, I'll modify the files so that the base theme no longer appears in theme variant setting.