@@ -66,6 +66,7 @@ import com.woocommerce.android.ui.compose.component.BarcodeEAN13Code
66
66
import com.woocommerce.android.ui.compose.component.getText
67
67
import com.woocommerce.android.ui.compose.preview.FontScalePreviews
68
68
import com.woocommerce.android.ui.woopos.common.composeui.WooPosPreview
69
+ import com.woocommerce.android.ui.woopos.common.composeui.component.WooPosBrightnessControl
69
70
import com.woocommerce.android.ui.woopos.common.composeui.component.WooPosButton
70
71
import com.woocommerce.android.ui.woopos.common.composeui.component.WooPosButtonState
71
72
import com.woocommerce.android.ui.woopos.common.composeui.component.WooPosDialogWrapper
@@ -141,6 +142,8 @@ fun WooPosScanningSetupDialog(
141
142
id = R .string.woopos_scanning_setup_dialog_content_description
142
143
)
143
144
) {
145
+ WooPosBrightnessControl (temporarilyIncreaseToMax = true )
146
+
144
147
val state by viewModel.state.collectAsState()
145
148
Column (
146
149
modifier = Modifier
@@ -308,10 +311,10 @@ private fun ScannerModeSetupContent(
308
311
309
312
Box (
310
313
modifier = Modifier
311
- .size(172 .dp)
314
+ .size(184 .dp)
312
315
.clip(RoundedCornerShape (WooPosCornerRadius .Medium .value))
313
316
.background(Color .White )
314
- .padding(WooPosSpacing .Small .value.toAdaptivePadding()),
317
+ .padding(WooPosSpacing .Medium .value.toAdaptivePadding()),
315
318
contentAlignment = Alignment .Center
316
319
) {
317
320
Image (
@@ -366,13 +369,20 @@ private fun TestScannerContent(
366
369
modifier = Modifier .padding(bottom = WooPosSpacing .Large .value.toAdaptivePadding())
367
370
)
368
371
369
- BarcodeEAN13Code (
370
- barcodeValue,
371
- 300 .dp,
372
- 150 .dp,
373
- codeColor = MaterialTheme .colorScheme.onSurface,
374
- backgroundColor = MaterialTheme .colorScheme.surfaceBright
375
- )
372
+ Box (
373
+ modifier = Modifier
374
+ .size(300 .dp, 150 .dp)
375
+ .clip(RoundedCornerShape (WooPosCornerRadius .Medium .value))
376
+ .background(Color .White )
377
+ .padding(WooPosSpacing .Medium .value.toAdaptivePadding()),
378
+ contentAlignment = Alignment .Center
379
+ ) {
380
+ BarcodeEAN13Code (
381
+ barcodeValue,
382
+ 300 .dp,
383
+ 150 .dp
384
+ )
385
+ }
376
386
377
387
Spacer (modifier = Modifier .height(WooPosSpacing .XLarge .value.toAdaptivePadding()))
378
388
@@ -862,3 +872,44 @@ fun WooPosScanningSetupTestScannerFailedStep() {
862
872
}
863
873
}
864
874
}
875
+
876
+ @WooPosPreview
877
+ @Composable
878
+ fun WooPosScanningSetupTestQRContent () {
879
+ WooPosTheme {
880
+ Box (
881
+ modifier = Modifier .fillMaxSize(),
882
+ contentAlignment = Alignment .Center
883
+ ) {
884
+ ScannerModeSetupContent (
885
+ onPrimaryClick = {},
886
+ onSecondaryClick = {},
887
+ primaryButtonText = " Next" ,
888
+ secondaryButtonText = " Back" ,
889
+ title = " Scanner Mode Setup" ,
890
+ message = " Follow the instructions to set up your scanner in HID mode." ,
891
+ qrCodeImageRes = R .drawable.ic_woopos_reader_setup_code_star_bsh_20
892
+ )
893
+ }
894
+ }
895
+ }
896
+
897
+ @WooPosPreview
898
+ @Composable
899
+ fun WooPosScanningSetupTestBarcodeContent () {
900
+ WooPosTheme {
901
+ Box (
902
+ modifier = Modifier .fillMaxSize(),
903
+ contentAlignment = Alignment .Center
904
+ ) {
905
+ TestScannerContent (
906
+ onSecondaryClick = {},
907
+ secondaryButtonText = " Back" ,
908
+ title = " Scanner Mode Setup" ,
909
+ message = " Follow the instructions to set up your scanner in HID mode." ,
910
+ barcodeValue = " 123456789012" ,
911
+ onBarcodeScanned = {},
912
+ )
913
+ }
914
+ }
915
+ }
0 commit comments