Selaa lähdekoodia

ChatGpt-UI优化

liyijie 1 vuosi sitten
vanhempi
commit
11b3851d04

+ 2 - 1
PDF Office/Views/Dialog/ChatGPTAIDialogs/DocumentaryTranslationDialog.xaml

@@ -22,7 +22,8 @@
                 </Grid.ColumnDefinitions>
                 <Grid>
                     <ContentControl
-                       
+                       Width="106"
+                        Height="140"
                 HorizontalAlignment="Stretch"
                 prism:RegionManager.RegionName="{Binding ViewerRegionName}"/>
                 </Grid>

+ 1 - 1
PDF Office/Views/Dialog/ChatGPTAIDialogs/SelectedTranslationDialog.xaml

@@ -65,7 +65,7 @@
                         <Grid Width="250" Height="180" Margin="16,0,0,0">
                             <TextBox Name="textBoxEnterCharacters" Width="250" Height="180" Text="{Binding SelectedText}">
                             </TextBox>
-                            <TextBlock Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0:0/150}}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8"/>
+                            <TextBlock Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0}/150}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8"/>
                         </Grid>
                         <Button HorizontalAlignment="Right" Width="97" Height="24" Content="Translate" VerticalAlignment="Bottom" Style="{StaticResource Btn.cta}" Margin="0,8,0,0" Command="{Binding TranslateCommand}"></Button>
                     </StackPanel>

+ 7 - 7
PDF Office/Views/HomePanel/ChatGPTAI/ChatGPTAIErrorCorrectionContent.xaml

@@ -11,13 +11,13 @@
       mc:Ignorable="d"  
       d:DesignHeight="760" d:DesignWidth="1032"
      >
-    <Grid>
+    <Grid Margin="32,0,32,0">
         <Grid.RowDefinitions>
             <RowDefinition Height="*" />
             <RowDefinition Height="*" />
         </Grid.RowDefinitions>
         <StackPanel Grid.Row="0">
-            <Grid  Width="968">
+            <Grid  >
                 <StackPanel HorizontalAlignment="Left">
                     <TextBlock Text="AI Error Correction" FontFamily="Segoe UI"
             FontSize="20"
@@ -35,21 +35,21 @@
                 </StackPanel>
                 <Button HorizontalAlignment="Right" Width="104" Height="32" Content="ErrorCorrection" VerticalAlignment="Bottom" Style="{StaticResource Btn.cta}" Command="{Binding ErrorCorrectionCommand}"></Button>
             </Grid>
-            <Grid Width="968" Height="260" Margin="0,12,0,0">
-                <TextBox Name="textBoxEnterCharacters" Width="968" Height="260" Text="{Binding InputText}">
+            <Grid Height="260" Margin="0,12,0,0">
+                <TextBox Name="textBoxEnterCharacters"  Height="260" Text="{Binding InputText}">
                 </TextBox>
-                <TextBlock Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0:/150}}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8"/>
+                <TextBlock Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0}/150}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8"/>
             </Grid>
         </StackPanel>
         <StackPanel Grid.Row="1">
-            <Grid Width="968">
+            <Grid >
                 <TextBlock Text="Result" FontFamily="Segoe UI"
             FontSize="20"
             FontWeight="Bold"
             Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28" HorizontalAlignment="Left"></TextBlock>
                 <Button HorizontalAlignment="Right" Width="104" Height="32" Content="Copy" Background="White" Command="{Binding CopyCommand}"></Button>
             </Grid>
-            <TextBox Width="968" Height="260" Margin="0,12,0,0" Text="{Binding ErrorCorrectionText}">
+            <TextBox  Height="260" Margin="0,12,0,0" Text="{Binding ErrorCorrectionText}">
 
             </TextBox>
         </StackPanel>

+ 7 - 7
PDF Office/Views/HomePanel/ChatGPTAI/ChatGPTAIRewritingContent.xaml

@@ -11,13 +11,13 @@
       mc:Ignorable="d"  
       d:DesignHeight="760" d:DesignWidth="1032"
      >
-    <Grid>
+    <Grid Margin="32,0,32,0">
         <Grid.RowDefinitions>
             <RowDefinition Height="*" />
             <RowDefinition Height="*" />
         </Grid.RowDefinitions>
         <StackPanel Grid.Row="0">
-            <Grid  Width="968">
+            <Grid  >
                 <StackPanel HorizontalAlignment="Left">
                     <TextBlock Text="AI Rewriting" FontFamily="Segoe UI"
             FontSize="20"
@@ -35,21 +35,21 @@
                 </StackPanel>
                 <Button HorizontalAlignment="Right" Width="104" Height="32" Content="Rewrite" VerticalAlignment="Bottom" Style="{StaticResource Btn.cta}" Command="{Binding RewriteCommand}"></Button>
             </Grid>
-            <Grid Width="968" Height="260" Margin="0,12,0,0">
-                <TextBox Name="textBoxEnterCharacters" Width="968" Height="260" Text="{Binding InputText}">
+            <Grid  Height="260" Margin="0,12,0,0">
+                <TextBox Name="textBoxEnterCharacters"  Height="260" Text="{Binding InputText}">
                 </TextBox>
-                <TextBlock Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0:/150}}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8"/>
+                <TextBlock Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0}/150}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8"/>
             </Grid>
         </StackPanel>
         <StackPanel Grid.Row="1">
-            <Grid Width="968">
+            <Grid >
                 <TextBlock Text="Result" FontFamily="Segoe UI"
             FontSize="20"
             FontWeight="Bold"
             Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28" HorizontalAlignment="Left"></TextBlock>
                 <Button HorizontalAlignment="Right" Width="104" Height="32" Content="Copy" Background="White" Command="{Binding CopyCommand}" ></Button>
             </Grid>
-            <TextBox Width="968" Height="260" Margin="0,12,0,0" Text="{Binding RewriteText}">
+            <TextBox  Height="260" Margin="0,12,0,0" Text="{Binding RewriteText}">
 
             </TextBox>
         </StackPanel>

+ 2 - 2
PDF Office/Views/HomePanel/ChatGPTAI/ChatGPTAITranslationContent.xaml

@@ -11,13 +11,13 @@
       mc:Ignorable="d"  
       d:DesignHeight="760" d:DesignWidth="968"
      >
-    <Grid>
+    <Grid Margin="32,0,32,0" x:Name="TranslationGrid">
         <StackPanel>
             <TextBlock Text="AI Translation" FontFamily="Segoe UI"
             FontSize="20"
             FontWeight="Bold"
             Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28"></TextBlock>
-            <Border Margin="0,16,0,0" Width="968" Height="400" CornerRadius="8" BorderThickness="1" HorizontalAlignment="Left">
+            <Border Margin="0,16,0,0" Width="{Binding ElementName=TranslationGrid,Path=ActualWidth}"  Height="400" CornerRadius="8" BorderThickness="1" HorizontalAlignment="Left">
                 <Border.BorderBrush>
                     <VisualBrush>
                         <VisualBrush.Visual>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 5 - 5
PDF Office/Views/HomePanel/PDFTools/HomeFilesContent.xaml