Darkempire78 / OpenCalc

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

Design: Button Text Alignment. Material Menus #124

Closed ac87 closed 1 year ago

ac87 commented 1 year ago

More design questions than a bug.

Firstly awesome work, really good to see a replacement to AOSP calculator that looks modern.

I was trying to align the text more centrally in the buttons, this is most obvious with ( ) ^ . buttons. Because the font padding its not really possible using text, thoughts on using vector drawables instead for the buttons?

Before / After full The offset on the + and ( ) look more noticeable once the buttons get squashed. expanded

Note, I also tweaked the material color for the regular buttons, but I think I went one too far. Obviously the vector drawables can be tweaked/padded.

Another thing I've noticed is the menus aren't nicely rounded as you'd expect.

image

I put this down to you are basing the themes on AppCompat not Material3. Any objection to it being reworked so the menus will appear in Material theme? I think the com.google.android.material library gives you backwards compatibility to your min API 21 version.

Darkempire78 commented 1 year ago

I put this down to you are basing the themes on AppCompat not Material3. Any objection to it being reworked so the menus will appear in Material theme? I think the com.google.android.material library gives you backwards compatibility to your min API 21 version.

No, you are right, we should change appCompat to material. I used AppCompact because OpenCalc is my first Android app, I didn't know anything about it so I took it by default

Darkempire78 commented 1 year ago

I was trying to align the text more centrally in the buttons, this is most obvious with ( ) ^ . buttons. Because the font padding its not really possible using text, thoughts on using vector drawables instead for the buttons? The offset on the + and ( ) look more noticeable once the buttons get squashed.

It really makes it more beautiful!

Darkempire78 commented 1 year ago

Note, I also tweaked the material color for the regular buttons, but I think I went one too far. Obviously the vector drawables can be tweaked/padded.

It looks good but it is a little bit too dark. However I agree that default button color have to be reworked

GEROGIANNIS commented 1 year ago

I have also noticed that the theme menu selection is always white, it might be better to change its color so its the same with the theme you pick.

Screenshot_20221210-151925_Calculator_1.png

ac87 commented 1 year ago

@Darkempire78 For a first app this is really good work, hopefully I can help with a few pointers

Have pushed a start to my fork if you are interested in the icon changes. https://github.com/Darkempire78/OpenCalc/compare/main...ac87:OpenCalc:vector-icon-buttons

I dropped the regular buttons from material_dynamic_neutral30 to material_dynamic_neutral20 now, instead of 10 in the screenshots.

Darkempire78 commented 1 year ago

@ac87 It seems good but the problem with the decimal separator is that it changes depending the language, idk if there are other options than only comma and dot

Darkempire78 commented 1 year ago

@ac87 It seems good but the problem with the decimal separator is that it changes depending the language, idk if there are other options than only comma and dot

From wikipedia only dot and comma seem to be used https://en.wikipedia.org/wiki/Decimal_separator?wprov=sfla1

ac87 commented 1 year ago

@Darkempire78 I could also only find two separators. Was a bit worried about that one too.

Just committed some more rework on that branch, had a bit of a headache getting themes to work as I'd expect them to. Basically using dark selectors for colors and style.

The result is the designer in Android Studio now works correctly as Dark is not a theme in its own right. image image

It makes the theme selection more complicated although now you can force light/dark on Material You theme as well. image

Because the correct base theme is used a lot less colors need to be overridden so menus appear to follow the dark/light mode.

I'm hoping now that changed AppCompat to Material is easier now. As that dialog still hurts my OCD as its not rounded and pretty!

Darkempire78 commented 1 year ago

I think that Dark/Light should be at the top of the popup

ac87 commented 1 year ago

Just got this to the point it was working to be honest, previously you had

The problem with the style selection is it obviously doesn't apply to AMOLED theme, that's why I put it underneath as it gets disabled if AMOLED.

Darkempire78 commented 1 year ago

ok I understand, it's a little less intuitive than before

ac87 commented 1 year ago

Agreed with that. Did think about if material supported switching default to material entirely but thought that was a step too far. Obviously can change it as you like.

ac87 commented 1 year ago

Changes merged in. If you have any bugs from this let me know.

Once again, great work on the app!