Simplify article viewer theming
This commit is contained in:
parent
513e5abcd1
commit
7cdb057560
@ -392,24 +392,12 @@ class ArticleFragment : Fragment() {
|
||||
binding.webcontent.visibility = View.VISIBLE
|
||||
val (textColor, backgroundColor) = if (appColors.isDarkTheme) {
|
||||
if (context != null) {
|
||||
binding.webcontent.setBackgroundColor(
|
||||
ContextCompat.getColor(
|
||||
requireContext(),
|
||||
R.color.dark_webview
|
||||
)
|
||||
)
|
||||
Pair(ContextCompat.getColor(requireContext(), R.color.dark_webview_text), ContextCompat.getColor(requireContext(), R.color.dark_webview))
|
||||
} else {
|
||||
Pair(null, null)
|
||||
}
|
||||
} else {
|
||||
if (context != null) {
|
||||
binding.webcontent.setBackgroundColor(
|
||||
ContextCompat.getColor(
|
||||
requireContext(),
|
||||
R.color.light_webview
|
||||
)
|
||||
)
|
||||
Pair(ContextCompat.getColor(requireContext(), R.color.light_webview_text), ContextCompat.getColor(requireContext(), R.color.light_webview))
|
||||
} else {
|
||||
Pair(null, null)
|
||||
|
@ -65,6 +65,7 @@
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:paddingBottom="48dp"
|
||||
android:background="?android:colorBackground"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
Loading…
Reference in New Issue
Block a user