@@ -6,6 +6,7 @@ import android.content.Context
66import android.provider.Settings
77import androidx.compose.foundation.background
88import androidx.compose.foundation.border
9+ import androidx.compose.foundation.clickable
910import androidx.compose.foundation.isSystemInDarkTheme
1011import androidx.compose.foundation.layout.Arrangement
1112import androidx.compose.foundation.layout.Column
@@ -20,14 +21,12 @@ import androidx.compose.foundation.shape.RoundedCornerShape
2021import androidx.compose.foundation.text.BasicTextField
2122import androidx.compose.material.icons.Icons
2223import androidx.compose.material.icons.automirrored.filled.KeyboardArrowLeft
23- import androidx.compose.material.icons.filled.Close
2424import androidx.compose.material3.Button
2525import androidx.compose.material3.ButtonDefaults
2626import androidx.compose.material3.Card
2727import androidx.compose.material3.CardDefaults
2828import androidx.compose.material3.HorizontalDivider
2929import androidx.compose.material3.Icon
30- import androidx.compose.material3.IconButton
3130import androidx.compose.material3.MaterialTheme
3231import androidx.compose.material3.Text
3332import androidx.compose.runtime.Composable
@@ -111,22 +110,18 @@ fun isScribeKeyboardActive(context: Context): Boolean {
111110 * @param chapterTitle The title of the current chapter (e.g., "Noun annotation").
112111 * @param step The [TutorialStep] data for the current step.
113112 * @param onBackPress Callback when the back button is pressed.
114- * @param onClosePress Callback when the close (X) button is pressed.
115113 * @param onNextPress Callback when the Next/Finish button is pressed.
116114 * @param modifier Modifier for this composable.
117115 * @param isLastStep Whether this is the final step in the entire tutorial.
118- * @param showQuickTutorialHeader Whether to show "Quick tutorial" back link instead of back arrow.
119116 */
120117@Composable
121118fun TutorialStepScreen (
122119 chapterTitle : String ,
123120 step : TutorialStep ,
124121 onBackPress : () -> Unit ,
125- onClosePress : () -> Unit ,
126122 onNextPress : () -> Unit ,
127123 modifier : Modifier = Modifier ,
128124 isLastStep : Boolean = false,
129- showQuickTutorialHeader : Boolean = false,
130125) {
131126 val context = LocalContext .current
132127 var isScribeActive by remember { mutableStateOf(isScribeKeyboardActive(context)) }
@@ -155,7 +150,6 @@ fun TutorialStepScreen(
155150 if (! isScribeActive) {
156151 WrongKeyboardScreen (
157152 onBackPress = onBackPress,
158- onClosePress = onClosePress,
159153 )
160154 return
161155 }
@@ -200,39 +194,24 @@ fun TutorialStepScreen(
200194 Modifier
201195 .fillMaxWidth()
202196 .padding(horizontal = 8 .dp, vertical = 12 .dp),
203- horizontalArrangement = Arrangement .SpaceBetween ,
197+ horizontalArrangement = Arrangement .Start ,
204198 verticalAlignment = Alignment .CenterVertically ,
205199 ) {
206- IconButton (onClick = onBackPress) {
207- if (showQuickTutorialHeader) {
208- Row (verticalAlignment = Alignment .CenterVertically ) {
209- Icon (
210- imageVector = Icons .AutoMirrored .Filled .KeyboardArrowLeft ,
211- contentDescription = " Back" ,
212- tint = headerColor,
213- )
214- Text (
215- text = " Quick tutorial" ,
216- color = headerColor,
217- fontSize = 14 .sp,
218- )
219- }
220- } else {
221- Icon (
222- imageVector = Icons .AutoMirrored .Filled .KeyboardArrowLeft ,
223- contentDescription = " Back" ,
224- tint = headerColor,
225- modifier = Modifier .size(28 .dp),
226- )
227- }
228- }
229- IconButton (onClick = onClosePress) {
200+ Row (
201+ verticalAlignment = Alignment .CenterVertically ,
202+ modifier = Modifier .clickable { onBackPress() }.padding(8 .dp)
203+ ) {
230204 Icon (
231- imageVector = Icons .Filled .Close ,
232- contentDescription = " Close tutorial " ,
205+ imageVector = Icons .AutoMirrored . Filled .KeyboardArrowLeft ,
206+ contentDescription = " Back " ,
233207 tint = headerColor,
234208 modifier = Modifier .size(24 .dp),
235209 )
210+ Text (
211+ text = " Quick tutorial" ,
212+ color = headerColor,
213+ fontSize = 16 .sp,
214+ )
236215 }
237216 }
238217
@@ -257,7 +236,7 @@ fun TutorialStepScreen(
257236 .padding(horizontal = 20 .dp)
258237 .border(
259238 width = 2 .dp,
260- color = primaryColor ,
239+ color = Color . Transparent ,
261240 shape = RoundedCornerShape (12 .dp),
262241 ),
263242 ) {
0 commit comments