Skip to content

Commit

Permalink
Limit maximum corner radius for large and extra large shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
MM2-0 committed Aug 2, 2022
1 parent 6bbc04a commit 3ebea88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/src/main/java/de/mm20/launcher2/ui/theme/LauncherTheme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.coerceAtMost
import androidx.compose.ui.unit.dp
import de.mm20.launcher2.preferences.LauncherDataStore
import de.mm20.launcher2.preferences.Settings
Expand Down Expand Up @@ -78,8 +79,8 @@ fun LauncherTheme(
extraSmall = baseShape.copy(CornerSize(cornerRadius / 3f)),
small = baseShape.copy(CornerSize(cornerRadius / 3f * 2f)),
medium = baseShape.copy(CornerSize(cornerRadius)),
large = baseShape.copy(CornerSize(cornerRadius / 3f * 4f)),
extraLarge = baseShape.copy(CornerSize(cornerRadius / 3f * 7f)),
large = baseShape.copy(CornerSize((cornerRadius / 3f * 4f).coerceAtMost(16.dp))),
extraLarge = baseShape.copy(CornerSize((cornerRadius / 3f * 7f).coerceAtMost(28.dp))),
),
content = content
)
Expand Down

0 comments on commit 3ebea88

Please sign in to comment.