Skip to content

Commit

Permalink
Use Roboto condensed font to show component descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
lihenggui committed Jul 3, 2023
1 parent 18b75c1 commit b51b6ad
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2023 Blocker
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.merxury.blocker.core.designsystem.theme

import androidx.compose.runtime.Composable
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import com.merxury.blocker.core.designsystem.R

@Composable
fun TextStyle.condensedRegular() = this.copy(
fontFamily = FontFamily(Font(R.font.roboto_condensed_regular)),
)
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import com.merxury.blocker.core.designsystem.component.scrollbar.scrollbarState
import com.merxury.blocker.core.designsystem.icon.BlockerDisplayIcon
import com.merxury.blocker.core.designsystem.icon.BlockerIcons
import com.merxury.blocker.core.designsystem.theme.BlockerTheme
import com.merxury.blocker.core.designsystem.theme.condensedRegular
import com.merxury.blocker.core.model.ComponentType
import com.merxury.blocker.core.model.ComponentType.SERVICE
import com.merxury.blocker.core.ui.R.string
Expand Down Expand Up @@ -200,7 +201,10 @@ fun ComponentListItem(
BlockerBodyMediumText(text = name)
description?.let {
Spacer(modifier = Modifier.height(4.dp))
BlockerBodyMediumText(text = it)
BlockerBodyMediumText(
text = it,
style = MaterialTheme.typography.bodyMedium.condensedRegular(),
)
}
}
Spacer(modifier = Modifier.weight(1f))
Expand Down

0 comments on commit b51b6ad

Please sign in to comment.