Parcourir la source

英文UI适配

gavin.chen il y a 2 ans
Parent
commit
eae800e071

+ 2 - 1
lib/view/measure/measure_main_view.dart

@@ -514,7 +514,8 @@ class _MeasureMainViewState extends State<MeasureMainView> {
                         maintainAnimation: true,
                         maintainSize: true,
                         child: SizedBox(
-                          width: 210,
+                          /// TODO:[Gavin] 多语言-UI-整合
+                          width: i18nBook.isCurrentChinese ? 210 : 270,
                           child: AIPaintInfoReslut(
                             playerController as VidPlayerController,
                           ),

+ 8 - 2
lib/view/menu_button_group/menu_button_group.dart

@@ -318,10 +318,16 @@ class _FMenuButtonGroupState extends FState<FMenuButtonGroup> {
           child: FColumn(
             children: [
               if (isExpanded) ...[
-                FText(i18nBook.measure.collapseGroup.t),
+                FText(
+                  i18nBook.measure.collapseGroup.t,
+                  style: const TextStyle(fontSize: 12),
+                ),
                 const FIcon(Icons.arrow_drop_up)
               ] else ...[
-                FText(i18nBook.measure.expandGroup.t),
+                FText(
+                  i18nBook.measure.expandGroup.t,
+                  style: const TextStyle(fontSize: 12),
+                ),
                 const FIcon(Icons.arrow_drop_down)
               ]
             ],

+ 3 - 1
lib/view/mobile_view/mobile_right_panel.dart

@@ -1,3 +1,4 @@
+import 'package:fis_i18n/i18n.dart';
 import 'package:fis_measure/interfaces/process/player/play_controller.dart';
 import 'package:fis_measure/interfaces/process/workspace/mobile_measure_view_state_controller.dart';
 import 'package:fis_measure/view/measure/measure_left_annotation.dart';
@@ -71,7 +72,8 @@ class _MobileRightPanelState extends State<MobileRightPanel> {
               height: 220,
               child: FittedBox(
                 child: SizedBox(
-                  width: 210,
+                  /// TODO:[Gavin] 多语言-UI-整合
+                  width: i18nBook.isCurrentChinese ? 210 : 270,
                   child: AIPaintInfoReslut(
                     playerController as VidPlayerController,
                   ),

+ 59 - 41
lib/view/paint/parts/ai_resul_info.dart

@@ -109,52 +109,70 @@ class _ResultInfoState extends State<ResultInfo> {
               ),
               Container(
                 margin: const EdgeInsets.symmetric(
-                  vertical: 15,
+                  vertical: 5,
                 ),
                 padding: const EdgeInsets.only(right: 8),
-                child: SizedBox(
-                  width: 70,
-                  height: 70,
-                  child: Stack(
-                    children: [
-                      SizedBox(
-                        width: 70,
-                        height: 70,
-                        child: Obx(() {
-                          final aiDetected = widget.aiDetectedObject[
-                              aiPatintController.state.aiResultIndex];
-                          return CircularProgressIndicator(
-                            valueColor: AlwaysStoppedAnimation(
-                              _buildAITextColor(
-                                aiDetected.label,
-                              ),
-                            ),
-                            backgroundColor: Colors.grey,
-                            value: aiDetected.confidence,
-                          );
-                        }),
+                child: Column(
+                  children: [
+                    Text(
+                      i18nBook.measure.possibility.t,
+                      style: const TextStyle(
+                        color: Colors.grey,
                       ),
-                      Center(
-                        child: SizedBox(
-                          width: 45,
-                          height: 45,
-                          child: Obx(() {
-                            final confidence = widget
-                                .aiDetectedObject[
-                                    aiPatintController.state.aiResultIndex]
-                                .confidence;
-                            return Text(
-                              i18nBook.measure.possibility.t +
-                                  '${(confidence * 100).toStringAsFixed(1)}%',
-                              style: const TextStyle(
-                                color: Colors.white,
+                    ),
+                    const SizedBox(
+                      height: 8,
+                    ),
+                    SizedBox(
+                      width: 70,
+                      height: 70,
+                      child: Stack(
+                        children: [
+                          SizedBox(
+                            width: 70,
+                            height: 70,
+                            child: Obx(() {
+                              final aiDetected = widget.aiDetectedObject[
+                                  aiPatintController.state.aiResultIndex];
+                              return CircularProgressIndicator(
+                                valueColor: AlwaysStoppedAnimation(
+                                  _buildAITextColor(
+                                    aiDetected.label,
+                                  ),
+                                ),
+                                backgroundColor: Colors.grey,
+                                value: aiDetected.confidence,
+                              );
+                            }),
+                          ),
+                          Center(
+                            child: SizedBox(
+                              width: 65,
+                              height: 45,
+                              child: Obx(
+                                () {
+                                  final confidence = widget
+                                      .aiDetectedObject[aiPatintController
+                                          .state.aiResultIndex]
+                                      .confidence;
+                                  return Center(
+                                    child: Text(
+                                      '${(confidence * 100).toStringAsFixed(1)}%',
+                                      style: const TextStyle(
+                                        color: Colors.white,
+                                        fontSize: 18,
+                                        fontWeight: FontWeight.bold,
+                                      ),
+                                    ),
+                                  );
+                                },
                               ),
-                            );
-                          }),
-                        ),
+                            ),
+                          ),
+                        ],
                       ),
-                    ],
-                  ),
+                    ),
+                  ],
                 ),
               ),
             ],

+ 3 - 1
lib/view/paint/parts/ai_result.dart

@@ -1,3 +1,4 @@
+import 'package:fis_i18n/i18n.dart';
 import 'package:fis_measure/view/paint/ai_patint_controller.dart';
 import 'package:fis_measure/view/paint/date_structure.dart';
 import 'package:fis_measure/view/paint/parts/ai_resul_info.dart';
@@ -27,7 +28,8 @@ class _AIResultPanelState extends State<AIResultPanel> {
       children: [
         Expanded(child: Container()),
         SizedBox(
-          width: 210,
+          /// TODO:[Gavin] 多语言-UI-整合
+          width: i18nBook.isCurrentChinese ? 210 : 270,
           child: Column(
             crossAxisAlignment: CrossAxisAlignment.start,
             children: [

+ 9 - 4
lib/view/paint/parts/feature_analysis.dart

@@ -68,10 +68,15 @@ class FeatureAnalysis extends StatelessWidget {
                   child: Column(
                     crossAxisAlignment: CrossAxisAlignment.start,
                     children: [
-                      Text(
-                        _buildDescriptionType(e.type),
-                        style: const TextStyle(
-                          color: Color.fromRGBO(54, 169, 206, 1),
+                      Tooltip(
+                        message: _buildDescriptionType(e.type),
+                        child: Text(
+                          _buildDescriptionType(e.type),
+                          style: const TextStyle(
+                            color: Color.fromRGBO(54, 169, 206, 1),
+                          ),
+                          overflow: TextOverflow.ellipsis,
+                          maxLines: 1,
                         ),
                       ),
                       Text(

+ 1 - 1
pubspec.yaml

@@ -95,7 +95,7 @@ dependency_overrides:
   fis_i18n:
     git:
       url: http://git.ius.plus:88/Project-Wing/fis_lib_i18n.git
-      ref: 30fa1d6
+      ref: 939f9b6
   fis_jsonrpc:
     git:
       url: http://git.ius.plus:88/Project-Wing/fis_lib_jsonrpc.git