-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix MessageList colors for better contrast
This removes the custom color attributes and replaces them by Material 3 colors.
- Loading branch information
Showing
10 changed files
with
33 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
core/ui/theme/api/src/main/kotlin/app/k9mail/core/ui/theme/api/ThemeColorHelper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package app.k9mail.core.ui.theme.api | ||
|
||
import androidx.annotation.ColorInt | ||
import androidx.core.graphics.ColorUtils | ||
|
||
const val SELECTED_COLOR_ALPHA = 0.1f | ||
const val ACTIVE_COLOR_ALPHA = 0.15f | ||
|
||
const val MAX_ALPHA = 255 | ||
|
||
object ThemeColorHelper { | ||
|
||
fun getSelectedColor(@ColorInt color: Int): Int { | ||
return ColorUtils.setAlphaComponent(color, (SELECTED_COLOR_ALPHA * MAX_ALPHA).toInt()) | ||
} | ||
|
||
fun getActiveColor(@ColorInt color: Int): Int { | ||
return ColorUtils.setAlphaComponent(color, (ACTIVE_COLOR_ALPHA * MAX_ALPHA).toInt()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters