mirror of
https://github.com/cmclark00/mintris.git
synced 2025-05-18 17:35:21 +01:00
UI improvements: Added border to selected theme and centered stats screen
This commit is contained in:
parent
843cae4b75
commit
ed7847ad70
2 changed files with 150 additions and 135 deletions
|
@ -86,6 +86,18 @@ class ThemeSelector @JvmOverloads constructor(
|
|||
// Set card background color based on theme
|
||||
setCardBackgroundColor(themeInfo.primaryColor)
|
||||
|
||||
// Add stroke for selected theme
|
||||
if (isSelected) {
|
||||
setContentPadding(4, 4, 4, 4)
|
||||
// Create a gradient drawable for the border
|
||||
val gradientDrawable = android.graphics.drawable.GradientDrawable().apply {
|
||||
setColor(themeInfo.primaryColor)
|
||||
setStroke(4, Color.WHITE)
|
||||
cornerRadius = 12f
|
||||
}
|
||||
background = gradientDrawable
|
||||
}
|
||||
|
||||
// Set card dimensions
|
||||
val cardSize = resources.getDimensionPixelSize(R.dimen.theme_card_size)
|
||||
layoutParams = GridLayout.LayoutParams().apply {
|
||||
|
@ -98,11 +110,6 @@ class ThemeSelector @JvmOverloads constructor(
|
|||
|
||||
// Apply locked/selected state visuals
|
||||
alpha = if (isUnlocked) 1.0f else 0.5f
|
||||
|
||||
// Add stroke for selected theme
|
||||
if (isSelected) {
|
||||
setContentPadding(4, 4, 4, 4)
|
||||
}
|
||||
}
|
||||
|
||||
// Create theme content container
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue