Skip to content

Commit a0e5ae4

Browse files
Use font styling
1 parent 03d65a0 commit a0e5ae4

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

app/src/main/java/org/schabi/newpipe/ui/components/channel/AboutChannelSection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fun AboutChannelSection(channelInfo: ParcelableChannelInfo) {
4242
) {
4343
if (description.isNotEmpty()) {
4444
item {
45-
Text(text = description)
45+
Text(text = description, style = MaterialTheme.typography.bodyMedium)
4646
}
4747
}
4848

app/src/main/java/org/schabi/newpipe/ui/components/metadata/MetadataItem.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import androidx.compose.ui.Alignment
1515
import androidx.compose.ui.Modifier
1616
import androidx.compose.ui.res.stringResource
1717
import androidx.compose.ui.text.AnnotatedString
18-
import androidx.compose.ui.text.font.FontWeight
1918
import androidx.compose.ui.text.style.TextAlign
2019
import androidx.compose.ui.tooling.preview.Preview
2120
import androidx.compose.ui.unit.dp
@@ -38,10 +37,10 @@ fun MetadataItem(@StringRes title: Int, value: AnnotatedString) {
3837
modifier = Modifier.width(96.dp),
3938
textAlign = TextAlign.End,
4039
text = stringResource(title).uppercase(),
41-
fontWeight = FontWeight.Bold
40+
style = MaterialTheme.typography.titleSmall
4241
)
4342

44-
Text(text = value)
43+
Text(text = value, style = MaterialTheme.typography.bodyMedium)
4544
}
4645
}
4746

app/src/main/java/org/schabi/newpipe/ui/components/metadata/TagsSection.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import androidx.compose.runtime.remember
1616
import androidx.compose.ui.Modifier
1717
import androidx.compose.ui.platform.LocalContext
1818
import androidx.compose.ui.res.stringResource
19-
import androidx.compose.ui.text.font.FontWeight
2019
import androidx.compose.ui.text.style.TextAlign
2120
import androidx.compose.ui.tooling.preview.Preview
2221
import androidx.compose.ui.unit.dp
@@ -35,7 +34,7 @@ fun TagsSection(serviceId: Int, tags: List<String>) {
3534
Text(
3635
modifier = Modifier.fillMaxWidth(),
3736
text = stringResource(R.string.metadata_tags).uppercase(),
38-
fontWeight = FontWeight.Bold,
37+
style = MaterialTheme.typography.titleMedium,
3938
textAlign = TextAlign.Center
4039
)
4140

app/src/main/java/org/schabi/newpipe/ui/components/video/StreamDescriptionSection.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import androidx.compose.ui.platform.LocalDensity
4040
import androidx.compose.ui.platform.rememberNestedScrollInteropConnection
4141
import androidx.compose.ui.res.painterResource
4242
import androidx.compose.ui.res.stringResource
43-
import androidx.compose.ui.text.font.FontWeight
4443
import androidx.compose.ui.tooling.preview.Preview
4544
import androidx.compose.ui.unit.dp
4645
import org.schabi.newpipe.R
@@ -83,7 +82,7 @@ fun StreamDescriptionSection(streamInfo: StreamInfo) {
8382
val date = Localization.formatDate(LocalContext.current, it.offsetDateTime())
8483
Text(
8584
text = stringResource(R.string.upload_date_text, date),
86-
fontWeight = FontWeight.Bold
85+
style = MaterialTheme.typography.titleMedium
8786
)
8887
}
8988

@@ -135,10 +134,10 @@ fun StreamDescriptionSection(streamInfo: StreamInfo) {
135134

136135
if (isSelectable) {
137136
SelectionContainer {
138-
Text(text = description)
137+
Text(text = description, style = MaterialTheme.typography.bodyMedium)
139138
}
140139
} else {
141-
Text(text = description)
140+
Text(text = description, style = MaterialTheme.typography.bodyMedium)
142141
}
143142
}
144143
}

0 commit comments

Comments
 (0)