@@ -32,12 +32,15 @@ import androidx.compose.runtime.mutableStateOf
32
32
import androidx.compose.runtime.remember
33
33
import androidx.compose.ui.Alignment
34
34
import androidx.compose.ui.Modifier
35
+ import androidx.compose.ui.draw.clip
35
36
import androidx.compose.ui.graphics.Color
36
37
import androidx.compose.ui.graphics.asImageBitmap
37
38
import androidx.compose.ui.input.pointer.pointerInput
38
39
import androidx.compose.ui.layout.ContentScale
40
+ import androidx.compose.ui.layout.ModifierLocalBeyondBoundsLayout
39
41
import androidx.compose.ui.platform.LocalDensity
40
42
import androidx.compose.ui.res.stringResource
43
+ import androidx.compose.ui.text.font.FontWeight
41
44
import androidx.compose.ui.text.style.TextAlign
42
45
import androidx.compose.ui.unit.IntSize
43
46
import androidx.compose.ui.unit.dp
@@ -74,10 +77,14 @@ fun CaptchaDebugDialog(
74
77
onCancel : () -> Unit ,
75
78
onSolutionSubmit : (Float , Map <String , List <Float >>) -> Unit
76
79
) {
77
- Dialog (onDismissRequest = onCancel, properties = DialogProperties (usePlatformDefaultWidth = false )) {
80
+ Dialog (
81
+ onDismissRequest = onCancel,
82
+ properties = DialogProperties (usePlatformDefaultWidth = false )
83
+ ) {
78
84
Surface (
79
85
shape = RoundedCornerShape (16 .dp),
80
86
color = AppColors .charcoalBlue,
87
+ modifier = Modifier .padding(16 .dp),
81
88
border = BorderStroke (1 .dp, AppColors .white.copy(alpha = 0.05f )),
82
89
tonalElevation = 8 .dp,
83
90
) {
@@ -122,27 +129,38 @@ fun CaptchaDebugView(
122
129
123
130
var dragJob: Job ? = remember { null }
124
131
val coroutineScope = remember { CoroutineScope (Dispatchers .Main ) }
132
+ val shape = RoundedCornerShape (8 .dp)
125
133
Column (
126
134
horizontalAlignment = Alignment .CenterHorizontally ,
127
135
verticalArrangement = Arrangement .Center ,
128
- modifier = Modifier .padding(top = 24 .dp, start = 24 .dp, end = 24 .dp)
136
+ modifier = Modifier .padding(top = 24 .dp, start = 24 .dp, end = 24 .dp, bottom = 16 .dp )
129
137
) {
130
138
Text (
131
139
stringResource(com.windscribe.vpn.R .string.complete_puzzle_to_continue),
132
140
color = Color .White ,
133
- style = font18
141
+ style = font18.copy(fontWeight = FontWeight . Medium )
134
142
)
135
143
Spacer (modifier = Modifier .height(24 .dp))
136
144
Box {
137
- Box {
145
+ Box (
146
+ modifier = Modifier
147
+ .border(
148
+ width = 1 .dp,
149
+ color = AppColors .white.copy(alpha = 0.05f ),
150
+ shape = shape
151
+ )
152
+ .clip(shape)
153
+ .background(Color .Transparent )
154
+ .padding(1 .dp)
155
+ ) {
138
156
Image (
139
157
bitmap = backgroundBitmap,
140
158
contentDescription = " Captcha Background" ,
141
159
modifier = with (density) {
142
160
Modifier
143
161
.height(backgroundSize.value.height.toDp())
144
162
.width(backgroundSize.value.width.toDp())
145
- }.background(color = Color . Transparent , shape = RoundedCornerShape ( 12 .dp)) ,
163
+ },
146
164
contentScale = ContentScale .FillBounds
147
165
)
148
166
}
@@ -192,7 +210,7 @@ fun CaptchaDebugView(
192
210
)
193
211
}
194
212
}
195
- Spacer (modifier = Modifier .height(16 .dp))
213
+ Spacer (modifier = Modifier .height(24 .dp))
196
214
Box (
197
215
modifier = Modifier
198
216
.fillMaxWidth()
@@ -206,12 +224,13 @@ fun CaptchaDebugView(
206
224
) {
207
225
Text (
208
226
stringResource(com.windscribe.vpn.R .string.slide_puzzle_piece_into_place),
209
- style = font12,
227
+ style = font12.copy(fontWeight = FontWeight . Normal ) ,
210
228
textAlign = TextAlign .Center ,
211
229
color = AppColors .white.copy(alpha = 0.50f ),
212
230
modifier = Modifier .align(Alignment .Center )
213
231
)
214
232
}
233
+ Spacer (modifier = Modifier .height(16 .dp))
215
234
TextButton (stringResource(id = com.windscribe.vpn.R .string.cancel), onClick = {
216
235
onCancel()
217
236
})
0 commit comments