Explorar o código

fix(mobile): 修正移动端测量页配置未初始化的问题 Review by baka

gavin.chen %!s(int64=2) %!d(string=hai) anos
pai
achega
3d4e919ccd

+ 2 - 2
lib/view/mobile_view/mobile_measure_main_view.dart

@@ -193,7 +193,7 @@ class _MobileMeasureMainViewState extends State<MobileMeasureMainView> {
           );
           PromptBox.snackbar(
             i18nBook.measure.saveLocation.t +
-                '' +
+                ' ' +
                 i18nBook.measure.measureImage.t,
             title: i18nBook.measure.screenshotSavedSuccessfully.t,
             textColor: const Color.fromARGB(
@@ -408,7 +408,7 @@ class _MobileMeasureMainViewState extends State<MobileMeasureMainView> {
                     LayoutId(
                       id: _LayerLayoutIds.result,
                       child: const SizedBox(
-                          height: 200, width: 140, child: MeasureResultPanel()),
+                          height: 200, width: 150, child: MeasureResultPanel()),
                     ),
                     LayoutId(
                       id: _LayerLayoutIds.canvasMagnifier,

+ 18 - 0
lib/view/mobile_view/mobile_measure_view.dart

@@ -103,9 +103,27 @@ class _MobileMeasureMainPageState extends State<MobileMeasureMainPage> {
     measureHandler.onChangeImageLoaded.addListener(changeImage);
     loadLayoutConfig();
     getImageInfo();
+    initDefaultMeasureSystemSetting();
     super.initState();
   }
 
+  /// 初始化默认用户设置
+  void initDefaultMeasureSystemSetting() {
+    final defaultMobileMeasureSystemSetting = MeasureSystemSettingDTO(
+      cursorSize: 16,
+      shapeCursorSize: 14,
+      showResultWindow: true,
+      fontSize: 14,
+      showCursorLine: true,
+      showDepthGuideline: true,
+      showBriefAnnotation: true,
+      autoSnapDistance: '20',
+      minCursorDistance: '20',
+      annotationFontSize: 14,
+    );
+    measureData.measureSystemSetting = defaultMobileMeasureSystemSetting;
+  }
+
   void getImageInfo() {
     measureData.measureImageData = MeasureImageData(
       patientCode: widget.patientCode,