improved color scheme & theming (#4507)
Follow up to https://github.com/tuskyapp/Tusky/pull/3921 - no more hardcoded `tusky_blue`, instead the `colorPrimary` attribute is used. This will help us when adding more themes, e.g a dynamic color one. - The `colorPrimary` of the dark theme is now lighter for more contrast and subsequently the `colorOnPrimary` is now dark grey instead of white. - `tusky_red_lighter` is now a bit more red than before - Tweaked color usage in a few places for better contrast I think this looks a bit unfamiliar but overall better and the higher contrast makes things noticeably easier to read. <img src="https://github.com/tuskyapp/Tusky/assets/10157047/4cbb92d8-b772-4e94-bc15-c4baf0e5473f" width="260"/>
This commit is contained in:
parent
125483db61
commit
dcbd6d558c
68 changed files with 272 additions and 233 deletions
|
|
@ -58,6 +58,7 @@ import com.bumptech.glide.load.resource.bitmap.RoundedCorners
|
|||
import com.bumptech.glide.request.target.CustomTarget
|
||||
import com.bumptech.glide.request.target.FixedSizeDrawable
|
||||
import com.bumptech.glide.request.transition.Transition
|
||||
import com.google.android.material.R as materialR
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.google.android.material.tabs.TabLayout.OnTabSelectedListener
|
||||
|
|
@ -698,8 +699,8 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
|
|||
startActivityWithSlideInAnimation(AnnouncementsActivity.newIntent(context))
|
||||
}
|
||||
badgeStyle = BadgeStyle().apply {
|
||||
textColor = ColorHolder.fromColor(MaterialColors.getColor(binding.mainDrawer, com.google.android.material.R.attr.colorOnPrimary))
|
||||
color = ColorHolder.fromColor(MaterialColors.getColor(binding.mainDrawer, com.google.android.material.R.attr.colorPrimary))
|
||||
textColor = ColorHolder.fromColor(MaterialColors.getColor(binding.mainDrawer, materialR.attr.colorOnPrimary))
|
||||
color = ColorHolder.fromColor(MaterialColors.getColor(binding.mainDrawer, materialR.attr.colorPrimary))
|
||||
}
|
||||
},
|
||||
DividerDrawerItem(),
|
||||
|
|
@ -856,7 +857,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvider {
|
|||
if (tabs[position].id == DIRECT) {
|
||||
val badge = tab.orCreateBadge
|
||||
badge.isVisible = accountManager.activeAccount?.hasDirectMessageBadge ?: false
|
||||
badge.backgroundColor = MaterialColors.getColor(binding.mainDrawer, com.google.android.material.R.attr.colorPrimary)
|
||||
badge.backgroundColor = MaterialColors.getColor(binding.mainDrawer, materialR.attr.colorPrimary)
|
||||
directMessageTab = tab
|
||||
}
|
||||
}.also { it.attach() }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue