increase default category size and better handle text overflow (#385)

This commit is contained in:
AmirHossein Abdolmotallebi 2025-01-27 08:55:48 +03:30 committed by GitHub
parent c3ed0dd541
commit ddec1f383f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -17,7 +17,7 @@ import org.koin.core.component.inject
data class HomePageStateToPersist( data class HomePageStateToPersist(
val downloadListState: TableState.SerializableTableState? = null, val downloadListState: TableState.SerializableTableState? = null,
val windowSize: Pair<Float, Float> = 1000f to 500f, val windowSize: Pair<Float, Float> = 1000f to 500f,
val categoriesWidth: Float = 170f, val categoriesWidth: Float = 185f,
) { ) {
class ConfigLens(prefix: String) : Lens<MapConfig, HomePageStateToPersist>, class ConfigLens(prefix: String) : Lens<MapConfig, HomePageStateToPersist>,
KoinComponent { KoinComponent {

View File

@ -24,6 +24,7 @@ import androidx.compose.ui.draw.rotate
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.pointer.PointerButton import androidx.compose.ui.input.pointer.PointerButton
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.abdownloadmanager.shared.utils.ui.myColors import com.abdownloadmanager.shared.utils.ui.myColors
import com.abdownloadmanager.shared.utils.div import com.abdownloadmanager.shared.utils.div
@ -120,6 +121,7 @@ private fun CategoryFilterItem(
category.name, category.name,
Modifier.weight(1f), Modifier.weight(1f),
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis,
fontWeight = if (isSelected) FontWeight.Bold else FontWeight.Normal, fontWeight = if (isSelected) FontWeight.Bold else FontWeight.Normal,
fontSize = myTextSizes.base fontSize = myTextSizes.base
) )
@ -209,6 +211,7 @@ fun StatusFilterItem(
Modifier.weight(1f), Modifier.weight(1f),
fontWeight = if (isSelected) FontWeight.Bold else FontWeight.Normal, fontWeight = if (isSelected) FontWeight.Bold else FontWeight.Normal,
fontSize = myTextSizes.lg, fontSize = myTextSizes.lg,
overflow = TextOverflow.Ellipsis,
maxLines = 1, maxLines = 1,
) )
MyIcon( MyIcon(