Skip to content

Commit

Permalink
Use AutoMirrored icons for volume controls.
Browse files Browse the repository at this point in the history
Replaced default volume icons with AutoMirrored versions to ensure proper mirroring in layouts supporting RTL (Right-to-Left) languages. This enhances the app's internationalization and accessibility.
  • Loading branch information
kdroidFilter committed Jan 24, 2025
1 parent d3c92c4 commit aad4699
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sample/composeApp/src/commonMain/kotlin/sample/app/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.VolumeOff
import androidx.compose.material.icons.automirrored.filled.VolumeUp
import androidx.compose.material.icons.filled.*
import androidx.compose.material3.*
import androidx.compose.runtime.*
Expand Down Expand Up @@ -194,9 +196,9 @@ fun App() {
) {
Icon(
imageVector = if (playerState.volume > 0f)
Icons.Default.VolumeUp
Icons.AutoMirrored.Filled.VolumeUp
else
Icons.Default.VolumeOff,
Icons.AutoMirrored.Filled.VolumeOff,
contentDescription = "Volume",
tint = MaterialTheme.colorScheme.primary
)
Expand Down

0 comments on commit aad4699

Please sign in to comment.