Skip to content

Commit

Permalink
♻️ Adjust grid size and simplify onClick function
Browse files Browse the repository at this point in the history
Grid size in the ResultPanel.kt has been increased to 320.dp to enhance user interaction by improving visibility. Also, in RegexMatchOption.kt, the call 'Modifier.onClick' has been swapped to 'Modifier.clickable' for both ease of understanding and consistency across the code.
  • Loading branch information
CXwudi committed Dec 1, 2023
1 parent 5066871 commit 9e440de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package mikufan.cx.songfinder.ui.component.main

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.onClick
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.RadioButton
import androidx.compose.material3.Text
Expand Down Expand Up @@ -71,6 +71,6 @@ fun RegexMatchOptionButton(
)
Text(
text = renderedOption.displayName,
modifier = Modifier.onClick { scope.launch { onOptionSet(renderedOption) } }
modifier = Modifier.clickable { scope.launch { onOptionSet(renderedOption) } }
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fun ResultPanelGrid(
modifier = modifier.padding(horizontal = MaterialTheme.spacing.padding),
) {
LazyVerticalGrid(
columns = GridCells.Adaptive(256.dp),
columns = GridCells.Adaptive(320.dp),
horizontalArrangement = Arrangement.spacedBy(MaterialTheme.spacing.spacingSmall),
verticalArrangement = Arrangement.spacedBy(MaterialTheme.spacing.spacingSmall),
// modifier = modifier.padding(end = MaterialTheme.spacing.paddingLarge),
Expand Down

0 comments on commit 9e440de

Please sign in to comment.