diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 2ff85e8..807cdc4 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -35,12 +35,12 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" SPEC CHECKSUMS: - device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342 + device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - flutter_blue_plus: 4837da7d00cf5d441fdd6635b3a57f936778ea96 - haptic_feedback: ccbfbef39de4757f4bdf0ef03e7dfb3ffb4363d3 - sensors_plus: 18a9b346c43e157da17d2c8e99def703f9efb9d8 - shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + flutter_blue_plus: e5808fc4e5ebc58bb911635f8fdaf5e2b4da2754 + haptic_feedback: 6d9ff6a70a5ca4ef470fbc5903c9c6c8d495d861 + sensors_plus: 3c3bac724a2128c895623e03efd82cf0e94fd8e8 + shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 PODFILE CHECKSUM: 2626946c0f4c5a786ca56bc00721109d51be6950 diff --git a/example/lib/main.dart b/example/lib/main.dart index fc52a19..2927f23 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -36,6 +36,7 @@ class _MainAppState extends State { bool _canDismiss = true; final UrpBleStrategy _bleStrategy = UrpBleStrategy(); + bool _useVirtual = false; @override @@ -84,6 +85,8 @@ class _MainAppState extends State { }), SecModalBuilder( canDismiss: _canDismiss, + turnOffOnClose: false, + disconnectOnClose: true, strategy: _useVirtual ? virtualStrategy : _bleStrategy, payload: "", onDismiss: () { @@ -103,22 +106,6 @@ class _MainAppState extends State { ); }, ), - ldSpacerL, - LdButton( - onPressed: () async { - final result = await secModal( - canDismiss: _canDismiss, - topRadius: 10, - bottomRadius: 10, - strategy: virtualStrategy, - payload: "", - insets: const EdgeInsets.all(1), - useSafeArea: true, - ).show(context); - debugPrint("Result: $result"); - }, - child: const Text("Show using secModal().show()"), - ), ]), ).padL(), ), diff --git a/example/pubspec.lock b/example/pubspec.lock index 540c7bb..8e06eac 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -321,10 +321,10 @@ packages: dependency: "direct main" description: name: liquid_flutter - sha256: "860b21081222fb6ac77e46014fda0e5e29ff72cb8568c7c532f5fbea90640ca6" + sha256: "0cffcff4333789c569f400b04bf04009ba4a1cd2b4b733bb81cc3a8b112c902c" url: "https://pub.dev" source: hosted - version: "19.0.0" + version: "19.1.0" logger: dependency: transitive description: @@ -376,42 +376,42 @@ packages: dependency: "direct main" description: name: mtrust_urp_ble_strategy - sha256: "9d1f2269a7f99400468cb98b2089f5831ae46c03bf033a2ef260841a4b7a711f" + sha256: "28ed48645bbd9848392cc02f01c2933066c99c3cecf4bfa685c8c94261ae506b" url: "https://pub.dev" source: hosted - version: "9.0.0-6" + version: "9.0.0-7" mtrust_urp_core: dependency: transitive description: name: mtrust_urp_core - sha256: "3765318619490727496b45c3a5fb041e53b07b0e6f7e099cef1a2de221ef72b5" + sha256: "35f55c815cee8b50c18ce3f5e784d3415d8b0306d570ce6da83ee97cdcb0ccce" url: "https://pub.dev" source: hosted - version: "9.0.0-6" + version: "9.0.0-7" mtrust_urp_types: dependency: "direct main" description: name: mtrust_urp_types - sha256: "65478d9c303a67638e9613d784bd2434240dbfcfc6c6c41c1584b9d77fd07d6b" + sha256: fcc680b35d9511b0aca433575d03d266c992e5ab77b5420b67410bd914e1769d url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "5.0.2" mtrust_urp_ui: dependency: "direct main" description: name: mtrust_urp_ui - sha256: "1ba16568ed9f1e85f94c27a9b958c536c165892d4babdd7ba93ac80cd53d29fa" + sha256: "2cfff43d2a0955fae75f02e02a57c74ccbda5552cfb5c234462d6bcebc259e1a" url: "https://pub.dev" source: hosted - version: "9.0.0-6" + version: "9.0.0-7" mtrust_urp_virtual_strategy: dependency: "direct main" description: name: mtrust_urp_virtual_strategy - sha256: "4c7d0a8dda95c4279da71f1c0cf6f7009e847ac41b9756cd89adb47d9939a86a" + sha256: bbbd868c1f9364daad89e4daca68fefe4b5216c9278ea3d77bfa5e3476d7a8fb url: "https://pub.dev" source: hosted - version: "9.0.0-6" + version: "9.0.0-7" multi_split_view: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index d0c4971..24a9ac8 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -11,11 +11,12 @@ dependencies: sdk: flutter mtrust_sec_kit: path: ../ - mtrust_urp_types: ^4.1.0 - mtrust_urp_ble_strategy: ^9.0.0-6 - mtrust_urp_virtual_strategy: ^9.0.0-6 - mtrust_urp_ui: ^9.0.0-6 + mtrust_urp_types: ^5.0.2 + mtrust_urp_ble_strategy: ^9.0.0-7 + mtrust_urp_virtual_strategy: ^9.0.0-7 + mtrust_urp_ui: ^9.0.0-7 liquid_flutter: ^19.0.0 + dev_dependencies: flutter_test: sdk: flutter diff --git a/lib/mtrust_sec_kit.dart b/lib/mtrust_sec_kit.dart index f3ce7e2..cf67bce 100644 --- a/lib/mtrust_sec_kit.dart +++ b/lib/mtrust_sec_kit.dart @@ -5,6 +5,7 @@ export 'package:mtrust_urp_types/sec.pb.dart'; export 'package:mtrust_urp_ui/mtrust_urp_ui.dart'; export 'src/sec_reader.dart'; +export 'src/sec_reader_exception.dart'; export 'src/ui/l10n/sec_locale.dart'; export 'src/ui/sec_modal.dart'; -export 'src/ui/sec_view.dart'; +export 'src/ui/sec_widget.dart'; diff --git a/lib/src/sec_reader.dart b/lib/src/sec_reader.dart index 1f2b6dc..b66d560 100644 --- a/lib/src/sec_reader.dart +++ b/lib/src/sec_reader.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:io'; import 'package:mtrust_sec_kit/mtrust_sec_kit.dart'; -import 'package:mtrust_sec_kit/src/sec_reader_exception.dart'; /// [SECReader] is a class that provides a high-level API to interact with /// a SEC reader. @@ -39,6 +38,15 @@ class SECReader extends CmdWrapper { /// The origin device. final UrpDeviceIdentifier origin; + int _requestTokenAmount = 10; + + /// Sets the amount of tokens to be requested if the device has no more + /// tokens available. The default is 10. + void setTokenAmount(int amount) { + _requestTokenAmount = amount; + notifyListeners(); + } + /// Find and connect to a SEC reader using the given [connectionStrategy]. /// If [deviceAddress] is provided, it will try to connect to the reader /// with the given address. @@ -319,14 +327,84 @@ class SECReader extends CmdWrapper { } /// Prepares (primes) a measurement for the given [payload]. - Future prime(String payload) async { + Future prime(String payload) async { final cmd = UrpSecDeviceCommand( command: UrpSecCommand.urpSecPrime, primeParameters: UrpSecPrimeParameters(payload: payload), ); + try { + final res = await _addCommandToQueue(deviceCommand: cmd); + return UrpSecPrimeResponse.fromBuffer(res.payload); + } catch (e) { + if(e is DeviceError) { + if(e.errorCode == 4) { + final publicKey = await getPublicKey(); + final oldToken = await requestToken(); + final newToken = await getToken(oldToken, publicKey); + if(newToken == null) { + throw SecReaderException( + message: 'Failed to get new tooken!', + type: SecReaderExceptionType.tokenFailed, + ); + } + await setToken(newToken); + return prime(payload); + } else { + rethrow; + } + } + return null; + } + } + + /// Request the device to send a new token request + Future requestToken() async { + final cmd = UrpSecDeviceCommand( + command: UrpSecCommand.urpSecRequestToken, + tokenRequest: UrpTokenRequest( + amount: _requestTokenAmount, + ), + ); + final res = await _addCommandToQueue( + deviceCommand: cmd, + ); + + if(!res.hasPayload()) { + throw SecReaderException( + message: 'Failed to request token!', + type: SecReaderExceptionType.tokenFailed, + ); + } + return UrpSecureToken.fromBuffer(res.payload); + } + + /// Install a new token after a token request on the device + Future setToken(UrpSecureToken token) async { + final cmd = UrpSecDeviceCommand( + command: UrpSecCommand.urpSecSetToken, + secureToken: token, + ); await _addCommandToQueue(deviceCommand: cmd); } + /// Request the currently installed token from the device + Future getCurrentToken() async { + final cmd = UrpSecDeviceCommand( + command: UrpSecCommand.urpSecGetToken, + ); + final res = await _addCommandToQueue( + deviceCommand: cmd, + ); + + if(!res.hasPayload()) { + throw SecReaderException( + message: 'Failed to get current token!', + type: SecReaderExceptionType.tokenFailed, + ); + } + return UrpSecureToken.fromBuffer(res.payload); + } + /// Unprime a measurement. Future unprime() async { final cmd = UrpSecDeviceCommand( @@ -341,12 +419,22 @@ class SECReader extends CmdWrapper { final cmd = UrpSecDeviceCommand( command: UrpSecCommand.urpSecStartMeasurement, ); - final result = await _addCommandToQueue(deviceCommand: cmd); + final res = await _addCommandToQueue(deviceCommand: cmd); - if (!result.hasPayload()) { - throw Exception('Failed to measure.'); + if (!res.hasPayload()) { + throw SecReaderException( + message: 'Failed to measure!', + type: SecReaderExceptionType.measurementFailed, + ); + } + try { + return UrpSecMeasurement.fromBuffer(res.payload); + } catch (e) { + throw SecReaderException( + message: 'Incompatible device firmware version. Please update!', + type: SecReaderExceptionType.incompatibleFirmware, + ); } - return UrpSecMeasurement.fromBuffer(result.payload); } /// Stop measurement diff --git a/lib/src/sec_reader_exception.dart b/lib/src/sec_reader_exception.dart index 845096d..7e20f4b 100644 --- a/lib/src/sec_reader_exception.dart +++ b/lib/src/sec_reader_exception.dart @@ -1,3 +1,16 @@ +/// Enumerates the types of exceptions that can be thrown by the SEC reader. +enum SecReaderExceptionType { + /// Firmware version installed on the device is incompatible + incompatibleFirmware, + /// Measurement failed + measurementFailed, + /// Failed to get or install new token + tokenFailed, + /// Unspecified error + unspecified, +} + + /// Exception thrown to indicate errors related to the SEC reader. /// /// This exception extends the [Error] class and is designed @@ -9,8 +22,10 @@ class SecReaderException extends Error { /// The [message] parameter can be used to provide additional details /// about the nature of the SEC reader error. If not specified, /// a default message will be used. + /// The [type] parameter can be used to specify the type of exception. SecReaderException({ this.message = 'Unspecified SEC reader error', + this.type = SecReaderExceptionType.unspecified, }); /// A message providing additional details about the SEC reader error. @@ -18,6 +33,9 @@ class SecReaderException extends Error { /// If not specified during the exception creation, a default message /// ("Unspecified SEC reader error") will be used. final String? message; + /// The type of exception that was thrown. + /// The default value is [SecReaderExceptionType.unspecified]. + final SecReaderExceptionType? type; } /// Exception thrown when a SEC reader is not found. diff --git a/lib/src/ui/l10n/sec_de.arb b/lib/src/ui/l10n/sec_de.arb index de41e01..a84c6bb 100644 --- a/lib/src/ui/l10n/sec_de.arb +++ b/lib/src/ui/l10n/sec_de.arb @@ -16,5 +16,8 @@ "searching": "Suchen...", "scanning": "Scannen...", "secondsLeft": "{seconds}s\nverbleibend", - "searchingHint": "Stellen Sie sicher, dass die LED \n am Reader blau blinkt." + "searchingHint": "Stellen Sie sicher, dass die LED \n am Reader blau blinkt.", + "incompatibleFirmware": "Inkompatible Firmware. Bitte Update durchführen!", + "tokenFailed": "Neuen Token abrufen fehlgeschlagen!", + "readingsLeft": "Verbleibende Messungen für aktuellen Token:" } \ No newline at end of file diff --git a/lib/src/ui/l10n/sec_en.arb b/lib/src/ui/l10n/sec_en.arb index 76a2a15..1745843 100644 --- a/lib/src/ui/l10n/sec_en.arb +++ b/lib/src/ui/l10n/sec_en.arb @@ -18,6 +18,8 @@ "disconnecting": "Disconnecting...", "searching": "Searching...", "scanning": "Scanning...", - "secondsLeft": "{seconds}s\nleft" - + "secondsLeft": "{seconds}s\nleft", + "incompatibleFirmware": "Firmware incompatible. Please update!", + "tokenFailed": "Getting new token failed!", + "readingsLeft": "Readings left with current token:" } \ No newline at end of file diff --git a/lib/src/ui/l10n/sec_locale.dart b/lib/src/ui/l10n/sec_locale.dart index 1af0e87..102baa0 100644 --- a/lib/src/ui/l10n/sec_locale.dart +++ b/lib/src/ui/l10n/sec_locale.dart @@ -208,6 +208,24 @@ abstract class SecLocalizations { /// In en, this message translates to: /// **'{seconds}s\nleft'** String secondsLeft(Object seconds); + + /// No description provided for @incompatibleFirmware. + /// + /// In en, this message translates to: + /// **'Firmware incompatible. Please update!'** + String get incompatibleFirmware; + + /// No description provided for @tokenFailed. + /// + /// In en, this message translates to: + /// **'Getting new token failed!'** + String get tokenFailed; + + /// No description provided for @readingsLeft. + /// + /// In en, this message translates to: + /// **'Readings left with current token:'** + String get readingsLeft; } class _SecLocalizationsDelegate extends LocalizationsDelegate { diff --git a/lib/src/ui/l10n/sec_locale_de.dart b/lib/src/ui/l10n/sec_locale_de.dart index 2677002..c64f9d3 100644 --- a/lib/src/ui/l10n/sec_locale_de.dart +++ b/lib/src/ui/l10n/sec_locale_de.dart @@ -64,4 +64,13 @@ class SecLocalizationsDe extends SecLocalizations { String secondsLeft(Object seconds) { return '${seconds}s\nverbleibend'; } + + @override + String get incompatibleFirmware => 'Inkompatible Firmware. Bitte Update durchführen!'; + + @override + String get tokenFailed => 'Neuen Token abrufen fehlgeschlagen!'; + + @override + String get readingsLeft => 'Verbleibende Messungen für aktuellen Token:'; } diff --git a/lib/src/ui/l10n/sec_locale_en.dart b/lib/src/ui/l10n/sec_locale_en.dart index 589dbe8..47fbc0c 100644 --- a/lib/src/ui/l10n/sec_locale_en.dart +++ b/lib/src/ui/l10n/sec_locale_en.dart @@ -64,4 +64,13 @@ class SecLocalizationsEn extends SecLocalizations { String secondsLeft(Object seconds) { return '${seconds}s\nleft'; } + + @override + String get incompatibleFirmware => 'Firmware incompatible. Please update!'; + + @override + String get tokenFailed => 'Getting new token failed!'; + + @override + String get readingsLeft => 'Readings left with current token:'; } diff --git a/lib/src/ui/sec_modal.dart b/lib/src/ui/sec_modal.dart index d609158..0f6ba28 100644 --- a/lib/src/ui/sec_modal.dart +++ b/lib/src/ui/sec_modal.dart @@ -161,36 +161,15 @@ LdModal secModal({ size: LdSize.s, modalContent: (context) => AspectRatio( aspectRatio: 1, - child: Stack( - children: [ - SecWidget( - strategy: strategy, - payload: payload, - onVerificationDone: (UrpSecMeasurement measurement) async { - Navigator.of(context).pop(SecResultSuccess(measurement)); - }, - onVerificationFailed: () async { - Navigator.of(context).pop(SecResultFailed()); - }, - ), - if (canDismiss) - Align( - alignment: Alignment.topRight, - child: IntrinsicHeight( - child: LdButton( - size: LdSize.s, - mode: LdButtonMode.vague, - onPressed: () async { - Navigator.of(context).pop(SecResultDismissed()); - }, - child: const Icon( - Icons.clear, - size: 18, - ), - ), - ), - ), - ], + child: SecWidget( + strategy: strategy, + payload: payload, + onVerificationDone: (UrpSecMeasurement measurement) async { + Navigator.of(context).pop(SecResultSuccess(measurement)); + }, + onVerificationFailed: () async { + Navigator.of(context).pop(SecResultFailed()); + }, ), ).padL(), ); diff --git a/lib/src/ui/sec_view.dart b/lib/src/ui/sec_widget.dart similarity index 78% rename from lib/src/ui/sec_view.dart rename to lib/src/ui/sec_widget.dart index 7563f29..2c47f58 100644 --- a/lib/src/ui/sec_view.dart +++ b/lib/src/ui/sec_widget.dart @@ -1,3 +1,5 @@ +// ignore_for_file: avoid_dynamic_calls + import 'package:flutter/material.dart'; import 'package:liquid_flutter/liquid_flutter.dart'; import 'package:mtrust_sec_kit/mtrust_sec_kit.dart'; @@ -39,21 +41,31 @@ class SecWidget extends StatelessWidget { connectionStrategy: strategy, storageAdapter: storageAdapter, connectedBuilder: (BuildContext context) { - return LdSubmit( - config: LdSubmitConfig( + return LdSubmit( + config: LdSubmitConfig( loadingText: SecLocalizations.of(context).primingTitle, autoTrigger: true, action: () async { final reader = SECReader( connectionStrategy: strategy, ); - await reader.prime(payload); - return true; + return reader.prime(payload); }, ), - builder: LdSubmitCustomBuilder( + builder: LdSubmitCustomBuilder( builder: (context, controller, stateType) { if (stateType == LdSubmitStateType.error) { + var message = controller.state.error?.message + ?? 'Unknown error'; + final moreInfo = controller.state.error?.moreInfo; + if(controller.state.error?.exception.runtimeType + == SecReaderException) { + final error = controller.state.error?.exception + as SecReaderException; + if(error.type == SecReaderExceptionType.tokenFailed) { + message = SecLocalizations.of(context).tokenFailed; + } + } return LdAutoSpace( crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -62,8 +74,12 @@ class SecWidget extends StatelessWidget { textAlign: TextAlign.center, ), LdTextP( - controller.state.error?.moreInfo ?? 'Unknown error', + message, ), + if(moreInfo != null) + LdTextP( + moreInfo, + ), Expanded( child: SecReaderVisualization( ledColor: Colors.red, @@ -107,6 +123,7 @@ class SecWidget extends StatelessWidget { controller.reset(); await onVerificationFailed(); }, + remainingScans: controller.state.result?.gsa, ); }, ), @@ -122,8 +139,10 @@ class _ScanningView extends StatelessWidget { required this.strategy, required this.onVerificationDone, required this.onVerificationFailed, + this.remainingScans, }); + final int? remainingScans; final ConnectionStrategy strategy; final Future Function(UrpSecMeasurement measurement) onVerificationDone; final Future Function() onVerificationFailed; @@ -145,8 +164,9 @@ class _ScanningView extends StatelessWidget { ), builder: LdSubmitCustomBuilder( builder: (context, measurementController, measurementStateType) { - return switch (measurementStateType) { - (LdSubmitStateType.loading) => LdAutoSpace( + switch (measurementStateType) { + case (LdSubmitStateType.loading): + return LdAutoSpace( crossAxisAlignment: CrossAxisAlignment.center, animate: true, children: [ @@ -166,8 +186,9 @@ class _ScanningView extends StatelessWidget { const CountDownProgress(), ldSpacerL, ], - ), - (LdSubmitStateType.result) => LdAutoSpace( + ); + case (LdSubmitStateType.result): + return LdAutoSpace( crossAxisAlignment: CrossAxisAlignment.center, animate: true, children: [ @@ -201,8 +222,9 @@ class _ScanningView extends StatelessWidget { ), ldSpacerL, ], - ), - (LdSubmitStateType.idle) => LdAutoSpace( + ); + case (LdSubmitStateType.idle): + return LdAutoSpace( animate: true, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -210,6 +232,11 @@ class _ScanningView extends StatelessWidget { SecLocalizations.of(context).readyToScan, textAlign: TextAlign.center, ), + ldSpacerL, + LdTextP( + """${SecLocalizations.of(context).readingsLeft} ${remainingScans ?? 'Unknown'}""", + textAlign: TextAlign.center, + ), LdTextP( SecLocalizations.of(context).timeHint, textAlign: TextAlign.center, @@ -227,8 +254,19 @@ class _ScanningView extends StatelessWidget { ), ), ], - ).padL(), - (LdSubmitStateType.error) => LdAutoSpace( + ).padL(); + case (LdSubmitStateType.error): + var message = SecLocalizations.of(context) + .verificationFailedMessage; + if(measurementController.state.error?.exception.runtimeType + == SecReaderExceptionType) { + final error = measurementController.state.error?.exception + as SecReaderException; + if(error.type == SecReaderExceptionType.incompatibleFirmware){ + message = SecLocalizations.of(context).incompatibleFirmware; + } + } + return LdAutoSpace( animate: true, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -237,7 +275,7 @@ class _ScanningView extends StatelessWidget { textAlign: TextAlign.center, ), LdTextP( - SecLocalizations.of(context).verificationFailedMessage, + message, textAlign: TextAlign.center, ), Expanded( @@ -255,8 +293,8 @@ class _ScanningView extends StatelessWidget { ), ), ], - ).padL(), - }; + ).padL(); + } }, ), ), diff --git a/pubspec.yaml b/pubspec.yaml index 93970e1..c0603e3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,14 +13,14 @@ dependencies: sdk: flutter intl: ^0.19.0 liquid_flutter: ^19.0.0 - mtrust_urp_core: ^9.0.0-6 - mtrust_urp_types: ^4.1.0 - mtrust_urp_ui: ^9.0.0-6 + mtrust_urp_core: ^9.0.0-7 + mtrust_urp_types: ^5.0.2 + mtrust_urp_ui: ^9.0.0-7 dev_dependencies: flutter_test: sdk: flutter golden_toolkit: ^0.15.0 - mtrust_urp_virtual_strategy: ^9.0.0-6 + mtrust_urp_virtual_strategy: ^9.0.0-7 very_good_analysis: ^5.1.0 flutter: uses-material-design: true diff --git a/test/goldens/SecWidget/Measure Fail/m-dark.png b/test/goldens/SecWidget/Measure Fail/m-dark.png index b9c4cf8..466101c 100644 Binary files a/test/goldens/SecWidget/Measure Fail/m-dark.png and b/test/goldens/SecWidget/Measure Fail/m-dark.png differ diff --git a/test/goldens/SecWidget/Measure Fail/m-light.png b/test/goldens/SecWidget/Measure Fail/m-light.png index 8976da2..4cc1870 100644 Binary files a/test/goldens/SecWidget/Measure Fail/m-light.png and b/test/goldens/SecWidget/Measure Fail/m-light.png differ diff --git a/test/goldens/SecWidget/Measuring/m-dark.png b/test/goldens/SecWidget/Measuring/m-dark.png index b9c4cf8..466101c 100644 Binary files a/test/goldens/SecWidget/Measuring/m-dark.png and b/test/goldens/SecWidget/Measuring/m-dark.png differ diff --git a/test/goldens/SecWidget/Measuring/m-light.png b/test/goldens/SecWidget/Measuring/m-light.png index 8976da2..4cc1870 100644 Binary files a/test/goldens/SecWidget/Measuring/m-light.png and b/test/goldens/SecWidget/Measuring/m-light.png differ diff --git a/test/goldens/SecWidget/Waiting for measurement/l-dark.png b/test/goldens/SecWidget/Waiting for measurement/l-dark.png index 481e510..4439537 100644 Binary files a/test/goldens/SecWidget/Waiting for measurement/l-dark.png and b/test/goldens/SecWidget/Waiting for measurement/l-dark.png differ diff --git a/test/goldens/SecWidget/Waiting for measurement/l-light.png b/test/goldens/SecWidget/Waiting for measurement/l-light.png index 9b94d53..e02ab13 100644 Binary files a/test/goldens/SecWidget/Waiting for measurement/l-light.png and b/test/goldens/SecWidget/Waiting for measurement/l-light.png differ diff --git a/test/goldens/SecWidget/Waiting for measurement/m-dark.png b/test/goldens/SecWidget/Waiting for measurement/m-dark.png index 00f5f68..28fcbb2 100644 Binary files a/test/goldens/SecWidget/Waiting for measurement/m-dark.png and b/test/goldens/SecWidget/Waiting for measurement/m-dark.png differ diff --git a/test/goldens/SecWidget/Waiting for measurement/m-light.png b/test/goldens/SecWidget/Waiting for measurement/m-light.png index 7996ef7..1bfe081 100644 Binary files a/test/goldens/SecWidget/Waiting for measurement/m-light.png and b/test/goldens/SecWidget/Waiting for measurement/m-light.png differ diff --git a/test/goldens/SecWidget/Waiting for measurement/s-dark.png b/test/goldens/SecWidget/Waiting for measurement/s-dark.png index 17cec50..13a2e82 100644 Binary files a/test/goldens/SecWidget/Waiting for measurement/s-dark.png and b/test/goldens/SecWidget/Waiting for measurement/s-dark.png differ diff --git a/test/goldens/SecWidget/Waiting for measurement/s-light.png b/test/goldens/SecWidget/Waiting for measurement/s-light.png index cd4c5f6..4945300 100644 Binary files a/test/goldens/SecWidget/Waiting for measurement/s-light.png and b/test/goldens/SecWidget/Waiting for measurement/s-light.png differ