fix:一些地方的Text style没有用LegadoTheme的问题
This commit is contained in:
@@ -56,6 +56,7 @@ import io.legado.app.ui.book.read.ConfigUpdate
|
|||||||
import io.legado.app.ui.book.read.ReadBookIntent
|
import io.legado.app.ui.book.read.ReadBookIntent
|
||||||
import io.legado.app.ui.theme.LegadoTheme
|
import io.legado.app.ui.theme.LegadoTheme
|
||||||
import io.legado.app.ui.widget.components.FontSelectSheet
|
import io.legado.app.ui.widget.components.FontSelectSheet
|
||||||
|
import io.legado.app.ui.widget.components.SectionTitle
|
||||||
import io.legado.app.ui.widget.components.dialog.ColorPickerSheet
|
import io.legado.app.ui.widget.components.dialog.ColorPickerSheet
|
||||||
import io.legado.app.ui.widget.components.settingItem.TinyClickableSettingItem
|
import io.legado.app.ui.widget.components.settingItem.TinyClickableSettingItem
|
||||||
import io.legado.app.ui.widget.components.settingItem.TinyColorSettingItem
|
import io.legado.app.ui.widget.components.settingItem.TinyColorSettingItem
|
||||||
@@ -498,14 +499,7 @@ internal fun HeaderFooterPage(
|
|||||||
.padding(horizontal = 16.dp)
|
.padding(horizontal = 16.dp)
|
||||||
.verticalScroll(rememberScrollState()),
|
.verticalScroll(rememberScrollState()),
|
||||||
) {
|
) {
|
||||||
Text(
|
SectionTitle(stringResource(R.string.read_config_divider_line))
|
||||||
text = stringResource(R.string.read_config_divider_line),
|
|
||||||
style = MaterialTheme.typography.titleSmallEmphasized,
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.padding(vertical = 8.dp),
|
|
||||||
textAlign = TextAlign.Center,
|
|
||||||
)
|
|
||||||
TinyColorSettingItem(
|
TinyColorSettingItem(
|
||||||
title = stringResource(R.string.tip_divider_color),
|
title = stringResource(R.string.tip_divider_color),
|
||||||
colorValue = when (ReadBookConfig.tipDividerColor) {
|
colorValue = when (ReadBookConfig.tipDividerColor) {
|
||||||
@@ -524,16 +518,7 @@ internal fun HeaderFooterPage(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(Modifier.height(8.dp))
|
SectionTitle(stringResource(R.string.text_typeface))
|
||||||
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.text_typeface),
|
|
||||||
style = MaterialTheme.typography.titleSmallEmphasized,
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.padding(vertical = 8.dp),
|
|
||||||
textAlign = TextAlign.Center,
|
|
||||||
)
|
|
||||||
TinyClickableSettingItem(
|
TinyClickableSettingItem(
|
||||||
title = stringResource(R.string.header_font),
|
title = stringResource(R.string.header_font),
|
||||||
description = stringResource(R.string.select_font),
|
description = stringResource(R.string.select_font),
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import androidx.compose.material.icons.filled.Visibility
|
|||||||
import androidx.compose.material.icons.filled.VisibilityOff
|
import androidx.compose.material.icons.filled.VisibilityOff
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.IconButton
|
import androidx.compose.material3.IconButton
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
@@ -203,7 +202,7 @@ private fun TitleBarIconItem(
|
|||||||
Icon(
|
Icon(
|
||||||
imageVector = icon,
|
imageVector = icon,
|
||||||
contentDescription = name,
|
contentDescription = name,
|
||||||
tint = MaterialTheme.colorScheme.onSurface.copy(alpha = alpha),
|
tint = LegadoTheme.colorScheme.onSurface.copy(alpha = alpha),
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = Modifier.size(24.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -211,8 +210,8 @@ private fun TitleBarIconItem(
|
|||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = name,
|
text = name,
|
||||||
style = MaterialTheme.typography.bodyLarge,
|
style = LegadoTheme.typography.bodyLarge,
|
||||||
color = MaterialTheme.colorScheme.onSurface.copy(alpha = alpha),
|
color = LegadoTheme.colorScheme.onSurface.copy(alpha = alpha),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -255,9 +254,9 @@ private fun TitleBarIconItem(
|
|||||||
},
|
},
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = if (item.enabled) {
|
tint = if (item.enabled) {
|
||||||
MaterialTheme.colorScheme.onSurface
|
LegadoTheme.colorScheme.onSurface
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colorScheme.onSurfaceVariant
|
LegadoTheme.colorScheme.onSurfaceVariant
|
||||||
},
|
},
|
||||||
modifier = Modifier.size(20.dp),
|
modifier = Modifier.size(20.dp),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,12 +8,13 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
import io.legado.app.ui.theme.LegadoTheme
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SectionTitle(title: String) {
|
fun SectionTitle(title: String) {
|
||||||
Text(
|
Text(
|
||||||
text = title,
|
text = title,
|
||||||
style = MaterialTheme.typography.labelMediumEmphasized,
|
style = LegadoTheme.typography.labelMediumEmphasized,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 8.dp),
|
.padding(vertical = 8.dp),
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import androidx.compose.material3.OutlinedButton
|
|||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import io.legado.app.ui.theme.LegadoTheme
|
||||||
import io.legado.app.ui.theme.LegadoTheme.composeEngine
|
import io.legado.app.ui.theme.LegadoTheme.composeEngine
|
||||||
import io.legado.app.ui.theme.ThemeResolver
|
import io.legado.app.ui.theme.ThemeResolver
|
||||||
import top.yukonga.miuix.kmp.basic.Button as MiuixButton
|
import top.yukonga.miuix.kmp.basic.Button as MiuixButton
|
||||||
@@ -25,7 +26,7 @@ fun PrimaryButton(
|
|||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
colors = MiuixButtonDefaults.buttonColorsPrimary()
|
colors = MiuixButtonDefaults.buttonColorsPrimary()
|
||||||
) {
|
) {
|
||||||
MiuixText(text = text)
|
MiuixText(text = text, style = LegadoTheme.typography.labelLarge)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Button(
|
Button(
|
||||||
@@ -33,7 +34,7 @@ fun PrimaryButton(
|
|||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
) {
|
) {
|
||||||
Text(text = text)
|
Text(text = text, style = LegadoTheme.typography.labelLarge)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,7 +53,7 @@ fun SecondaryButton(
|
|||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
colors = MiuixButtonDefaults.buttonColors()
|
colors = MiuixButtonDefaults.buttonColors()
|
||||||
) {
|
) {
|
||||||
MiuixText(text = text)
|
MiuixText(text = text,style = LegadoTheme.typography.labelLarge)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
OutlinedButton(
|
OutlinedButton(
|
||||||
@@ -60,7 +61,7 @@ fun SecondaryButton(
|
|||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
) {
|
) {
|
||||||
Text(text = text)
|
Text(text = text, style = LegadoTheme.typography.labelLarge)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user