Fix padding and link color for HtmlText
Some checks failed
Build & Test / Validate (pull_request) Successful in 16s
Build & Test / Validate (push) Successful in 15s
Build & Test / Run Unit Tests (pull_request) Failing after 8m12s
Build & Test / Run UI Tests (pull_request) Failing after 4m19s
Build & Test / Run Unit Tests (push) Failing after 5m27s
Build & Test / Run UI Tests (push) Failing after 5m27s
Some checks failed
Build & Test / Validate (pull_request) Successful in 16s
Build & Test / Validate (push) Successful in 15s
Build & Test / Run Unit Tests (pull_request) Failing after 8m12s
Build & Test / Run UI Tests (pull_request) Failing after 4m19s
Build & Test / Run Unit Tests (push) Failing after 5m27s
Build & Test / Run UI Tests (push) Failing after 5m27s
This commit is contained in:
parent
b94ba8d4c2
commit
06cbc5ec31
1 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,7 @@ package com.wbrawner.simplemarkdown.ui
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.webkit.WebView
|
import android.webkit.WebView
|
||||||
import androidx.compose.foundation.isSystemInDarkTheme
|
import androidx.compose.foundation.isSystemInDarkTheme
|
||||||
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
|
@ -62,8 +63,9 @@ fun MarkdownText(modifier: Modifier = Modifier, markdown: String) {
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.verticalScroll(rememberScrollState()),
|
.verticalScroll(rememberScrollState()),
|
||||||
|
verticalArrangement = Arrangement.Top
|
||||||
) {
|
) {
|
||||||
HtmlText(modifier = modifier, html = html)
|
HtmlText(html = html)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +78,9 @@ fun HtmlText(html: String, modifier: Modifier = Modifier) {
|
||||||
| background: #${materialColors.surface.toArgb().toHexString().substring(2)};
|
| background: #${materialColors.surface.toArgb().toHexString().substring(2)};
|
||||||
| color: #${materialColors.onSurface.toArgb().toHexString().substring(2)};
|
| color: #${materialColors.onSurface.toArgb().toHexString().substring(2)};
|
||||||
|}
|
|}
|
||||||
|
|a {
|
||||||
|
| color: #${materialColors.secondary.toArgb().toHexString().substring(2)};
|
||||||
|
|}
|
||||||
|pre {
|
|pre {
|
||||||
| background: #${materialColors.surfaceVariant.toArgb().toHexString().substring(2)};
|
| background: #${materialColors.surfaceVariant.toArgb().toHexString().substring(2)};
|
||||||
| color: #${materialColors.onSurfaceVariant.toArgb().toHexString().substring(2)};
|
| color: #${materialColors.onSurfaceVariant.toArgb().toHexString().substring(2)};
|
||||||
|
|
Loading…
Reference in a new issue