Skip to content

Conversation

@AndyScherzinger
Copy link
Member

@AndyScherzinger AndyScherzinger commented Jul 1, 2020

Resolve #6399

As a follow-up for #6332 and #6358 the link icon/background should be themed like the fab/primary-action-buttons now available via the #6332 theming logic.

* @param primaryColor the primary color
*/
private getColorForPrimary(int primaryColor) {
if (Color.BLACK == primaryColor) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this obeying dark mode?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at this very moment, we just do this based on the primary color for edge cases and else use the server's text-color value. See also my other comment.

} else if (Color.WHITE == primaryColor) {
return Color.BLACK;
} else {
return ThemeUtils.fontColor(context, false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this also a good idea to have this computed on server? font-color-light and font-color dark?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know, but @nickvergessen might be able to shed some light on the font-color calculations. I'd hope that with a fallback-ing background color working for dark/light the text-color of a button doesn't have any contrast issues anymore. So we would rather have to discuss if primary button texts would have to be white/black or if we just use white in both theme variants.

So also pinging @jancborchardt about this. ATM we don't have text-color variant from the server (also with element-color reference)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for me to have this in next PR 👍

@AndyScherzinger AndyScherzinger force-pushed the themeIconImagesWithUnicolorBackgrounds branch 2 times, most recently from d1d29bb to 0a41867 Compare July 1, 2020 19:50
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger force-pushed the themeIconImagesWithUnicolorBackgrounds branch from 0a41867 to fd47348 Compare July 2, 2020 07:18
@nextcloud-android-bot
Copy link
Collaborator

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14836.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@nextcloud-android-bot
Copy link
Collaborator

stable-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@nextcloud-android-bot
Copy link
Collaborator

@nextcloud-android-bot
Copy link
Collaborator

Codacy

398

Lint

TypemasterPR
Warnings8383
Errors00

SpotBugs (new)

Warning TypeNumber
Bad practice Warnings27
Correctness Warnings61
Internationalization Warnings9
Malicious code vulnerability Warnings4
Multithreaded correctness Warnings9
Performance Warnings74
Security Warnings44
Dodgy code Warnings106
Total334

SpotBugs (master)

Warning TypeNumber
Bad practice Warnings27
Correctness Warnings61
Internationalization Warnings9
Malicious code vulnerability Warnings4
Multithreaded correctness Warnings9
Performance Warnings74
Security Warnings44
Dodgy code Warnings106
Total334

@tobiasKaminsky tobiasKaminsky merged commit 1126823 into master Jul 2, 2020
@delete-merged-branch delete-merged-branch bot deleted the themeIconImagesWithUnicolorBackgrounds branch July 2, 2020 11:55
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.13.0 milestone Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapt new theming logic for multiple share link icons

4 participants