Browse Source

checkCursorColor

Melon 9 months ago
parent
commit
bc04e4bd3d
1 changed files with 12 additions and 0 deletions
  1. 12 0
      lib/process/workspace/measure_data_controller.dart

+ 12 - 0
lib/process/workspace/measure_data_controller.dart

@@ -358,6 +358,18 @@ class MeasureDataController implements IMeasureDataController {
     }
   }
 
+  void checkCursorColor(Color defaultColor) {
+    Color cursorColor = defaultColor;
+    final value = _measureSystemSetting.cursorColor;
+    if (value != null) {
+      if (value.startsWith("#")) {
+        Color colorFromHex = Color(int.parse(value.substring(1), radix: 16));
+        cursorColor = colorFromHex;
+      }
+    }
+    setPenColor(cursorColor);
+  }
+
   bool isContainsValue(List<MeasureSelectModel> list, String? value) {
     if (value == null) return false;
     for (var item in list) {