diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/home/search_by_subject/SearchStudySetBySubjectScreen.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/home/search_by_subject/SearchStudySetBySubjectScreen.kt index 3286a7bb..516bc367 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/home/search_by_subject/SearchStudySetBySubjectScreen.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/home/search_by_subject/SearchStudySetBySubjectScreen.kt @@ -149,7 +149,8 @@ fun SearchStudySetBySubject( ) { LazyColumn( modifier = Modifier - .fillMaxSize(), + .fillMaxSize() + .padding(horizontal = 16.dp), horizontalAlignment = Alignment.CenterHorizontally ) { item { @@ -157,7 +158,6 @@ fun SearchStudySetBySubject( searchQuery = searchQuery, onSearchQueryChange = { searchQuery = it }, placeholder = stringResource(R.string.txt_search_study_sets), - modifier = Modifier.padding(horizontal = 16.dp) ) } items(studySets?.itemCount ?: 0, key = { it }) { index -> @@ -168,7 +168,6 @@ fun SearchStudySetBySubject( ) ) { StudySetItem( - modifier = Modifier.padding(horizontal = 16.dp), studySet = studySet, onStudySetClick = { onStudySetClick(studySet) } ) @@ -207,8 +206,7 @@ fun SearchStudySetBySubject( Column( modifier = Modifier .fillMaxWidth() - .padding(innerPadding) - .padding(horizontal = 16.dp), + .padding(innerPadding), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(10.dp) ) { @@ -243,8 +241,7 @@ fun SearchStudySetBySubject( Column( modifier = Modifier .fillMaxWidth() - .padding(innerPadding) - .padding(horizontal = 16.dp), + .padding(innerPadding), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(10.dp) ) { diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/app/library/component/SearchTextField.kt b/app/src/main/java/com/pwhs/quickmem/presentation/app/library/component/SearchTextField.kt index ac40ab17..f1d85b6e 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/app/library/component/SearchTextField.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/app/library/component/SearchTextField.kt @@ -1,7 +1,6 @@ package com.pwhs.quickmem.presentation.app.library.component import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size @@ -10,7 +9,6 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme.colorScheme import androidx.compose.material3.MaterialTheme.typography -import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TextField import androidx.compose.material3.TextFieldDefaults.colors @@ -97,20 +95,12 @@ fun SearchTextField( } } -@Preview(showSystemUi = true) +@Preview(showBackground = true) @Composable private fun SearchTextFieldPreview() { QuickMemTheme { - Scaffold( - topBar = { - SearchTextField( - placeholder = "Search..." - ) - } - ) { - Column( - modifier = Modifier.padding(it) - ) { } - } + SearchTextField( + placeholder = "Search..." + ) } } \ No newline at end of file diff --git a/app/src/main/java/com/pwhs/quickmem/presentation/component/AlertDialog.kt b/app/src/main/java/com/pwhs/quickmem/presentation/component/AlertDialog.kt index c094f1cc..2808b0db 100644 --- a/app/src/main/java/com/pwhs/quickmem/presentation/component/AlertDialog.kt +++ b/app/src/main/java/com/pwhs/quickmem/presentation/component/AlertDialog.kt @@ -10,6 +10,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview @Composable @@ -21,17 +22,27 @@ fun QuickMemAlertDialog( text: String, confirmButtonTitle: String, dismissButtonTitle: String, - buttonColor: Color = colorScheme.primary + buttonColor: Color = colorScheme.primary, ) { AlertDialog( containerColor = Color.White, modifier = modifier, onDismissRequest = onDismissRequest, title = { - Text(text = title, style = typography.titleLarge) + Text( + text = title, + style = typography.titleLarge.copy( + fontWeight = FontWeight.Bold, + color = colorScheme.onBackground + ) + ) }, text = { - Text(text = text) + Text( + text = text, + style = typography.bodyMedium, + color = colorScheme.onBackground + ) }, confirmButton = { Button(