Skip to content
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

Use common colors #371

Open
Lineflyer opened this issue Jan 20, 2022 · 3 comments
Open

Use common colors #371

Lineflyer opened this issue Jan 20, 2022 · 3 comments
Labels
Bug Something isn't working Frontend Design User Interface problems

Comments

@Lineflyer
Copy link
Member

Describe your problem!

The title bar has been adapted to reuse the same color as the new icon.
Some places in the app (Settings, About) however use some strange other highlight color:
Screenshot_20220120-140044_WhereYouGo
Screenshot_20220120-140036_WhereYouGo

How to reproduce?

Open Settings / Click on app icon on top left on main screen (about dialog)

Actual result after these steps?

Wrong color

Expected result after these steps?

Same color as title bar

Reproducible

Yes

WhereYouGo Version

2022.01.14

System information

Screenshots from Android 12

Additional Information

No response

@Lineflyer Lineflyer added Bug Something isn't working Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility Frontend Design User Interface problems and removed Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility labels Jan 20, 2022
@SmallK-Rex
Copy link

I guess this is the default color of the light adroid theme. If it is desired to use the new color of the icon it is possible to implement that though. Probably several changes are needed to change the color of all elements.

@Lineflyer
Copy link
Member Author

@moving-bits Do you remember from c:geo how to define a proper accent color throughout? I guess it somehow need to be injected into the material theme somewhere...

@moving-bits
Copy link
Member

For c:geo we are using this to define our main theme (see beginning of main/res/values/themes.xml):

<style name="cgeo" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
    <!-- Action bar theming -->
    <item name="actionBarStyle">@style/actionBarStyle</item>
    <item name="android:actionOverflowButtonStyle">@style/actionBarActionOverflow</item>

    <!-- UX component styles -->
    <item name="checkboxStyle">@style/checkboxStyle</item>
    <item name="radioButtonStyle">@style/radioButtonStyle</item>
    <item name="materialAlertDialogTheme">@style/materialAlertDialogTheme</item>
    <item name="android:spinnerStyle">@style/spinnerStyle</item>

    <!-- set Material theme colors -->
    <item name="colorOnBackground">@color/colorText</item>
    <item name="android:colorBackground">@color/colorBackground</item>

    <item name="colorOnPrimary">?colorOnBackground</item>
    <item name="colorPrimary">@color/colorAccent</item>
    <item name="colorPrimaryVariant">@color/colorAccent</item>

    <item name="colorOnSecondary">?colorOnBackground</item>
    <item name="colorSecondary">@color/colorAccent</item>
    <item name="colorSecondaryVariant">@color/colorAccent</item>

    <!-- some components aren't fully compatible with AppCompat, therefore we need these legacy style definitions -->
    <item name="android:indeterminateTint">@color/colorAccent</item>
    <item name="android:progressTint">@color/colorAccent</item>
</style>

It's including a couple of sub-styles for specific components, and using colorAccent in a couple of places.

In main/AndroidManifest.xml this theme is referenced for our application:

<application
    android:name=".CgeoApplication"
    [...]
    android:theme="@style/cgeo"
    [...]
>

The color itself is defined in main/res/values/colors.xml

<color name="colorAccent">#F5981D</color>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Frontend Design User Interface problems
Projects
None yet
Development

No branches or pull requests

3 participants