Darkempire78 / OpenCalc

A simple and beautiful calculator for Android
GNU General Public License v3.0
737 stars 82 forks source link

Material Styles and Vector icon buttons #127

Closed ac87 closed 1 year ago

ac87 commented 1 year ago

As discussed in #124

Updates to use Material3 base themes and switches symbol button icons for vectors to ensure they are consistently aligned in the middle of the buttons.

Darkempire78 commented 1 year ago

Thank you so much! I'm extremely busy until Tuesday night, so I'll definitely be merging Tuesday night

Darkempire78 commented 1 year ago

First of all, thank you for your help! Most of your PR is awesome. Here are some changes that should be reviewed:

Otherwise it's great, thanks for your help!!

Darkempire78 commented 1 year ago

where do you find all the operators in vector?

ac87 commented 1 year ago

@Darkempire78 You are correct,

In your layout you've got many instances of android:fontFamily="@style/RobotoFontCondensedLight" I assumed this meant the font was condensed however because the declaration is wrong its not actually in effect. The landscape buttons are still using condensed in this branch, I assume you don't want this?

Happy to change things back (I think you can change this PR branch too)

As for the icons I made them in Inkscape then cleaned them up with https://www.svgminify.com/. They are pretty straightforward.

Darkempire78 commented 1 year ago

@ac87 It seems good! I just notice an issue in the amoled theme with the function buttons : image

Perhaps I should change the font for a better render. For example parenthesis are a little bit weird. I thing that a finer font would allow for a larger font size

ac87 commented 1 year ago

Fixed the amoled theme by setting the material theme background color to the amoled pure black background color.

https://material.io/blog/android-material-theme-color shows the different color that you can override in themes instead of adding new ones.

Darkempire78 commented 1 year ago

Thanks!

Darkempire78 commented 1 year ago

@ac87 I just realized that the theme "follow the system" does not support Material You anymore

ac87 commented 1 year ago

@Darkempire78 So if the users device supports Material You the System option was to use that? I'm confused as the Material You selection follows the system dark/light too.

Darkempire78 commented 1 year ago

Yes that's it, Material You should override the dark/light theme if it is enebaled on the device

ac87 commented 1 year ago

Just looking at the code before the PR

On Android 13,

System = Material You (Following System Dark/Light) Light = Default Theme (forced to light) Dark = Default Theme (forced to dark) Amoled Material You = same as System. Material You (Following System Dark/Light)

I can easily restore System to show Material You when supported

but does it make more sense for it you then be

as otherwise the first and last options are the same?

Darkempire78 commented 1 year ago

as otherwise the first and last options are the same?

That's true 🤔

ac87 commented 1 year ago

Have a look at this, see if that makes sense, https://github.com/Darkempire78/OpenCalc/compare/main...ac87:OpenCalc:material-you-system

Removes the standalone Material You selection but shows "System (Material You)" for clarity. Would be valid to just say "System" still