Procházet zdrojové kódy

add: 内容编辑侧边栏字体颜色新增黑色

liutian před 3 měsíci
rodič
revize
30c81f40e1

+ 2 - 2
packages/core/src/editor/text_editor.js

@@ -1114,9 +1114,9 @@ export class TextEditor {
       editAreaPtr: this.editAreaPtr,
       char: this.activeCharPlace
     })
-    
+
     const style = {
-      color: `rgb(${textStyle.R}, ${textStyle.G}, ${textStyle.B})`,
+      color: textStyle.color,
       opacity: Math.round(textStyle.Transparency * 100),
       fontStyle: textStyle.IsBold && textStyle.IsItalic ? 3 : !textStyle.IsBold && !textStyle.IsItalic ? 0 : textStyle.IsBold ? 1 : 2,
       fontSize: Math.round(textStyle.FontSize)

+ 3 - 0
packages/core/src/worker/compdfkit_worker.js

@@ -1080,6 +1080,9 @@ class CPDFWorker {
         editAreaPtr,
         char.SectionIndex, char.LineIndex, char.RunIndex, char.CharIndex,
       )
+
+      const { R = 0, G = 0, B = 0 } = EditTextStyle
+      EditTextStyle.color = convertCppRGBToHex(R, G, B)
       return EditTextStyle
     })
 

+ 4 - 4
packages/webview/src/components/ContentEditorPanel/ContentEditorPanel.vue

@@ -7,11 +7,11 @@
       <div class="color">
         <div class="color-title">{{ $t('editorPanel.fontColor') }}</div>
         <div class="colors-container">
-          <!-- <span class="cell-container">
-            <span class="cell-outer" :class="{ active: property.color === '#FFFFFF' }" @click="setActiveToolColor('#FFFFFF')">
-              <span class="cell while"></span>
+          <span class="cell-container">
+            <span class="cell-outer" :class="{ active: property.color === '#000000' }" @click="setActiveToolColor('#000000')">
+              <span class="cell black"></span>
             </span>
-          </span> -->
+          </span>
           <span class="cell-container">
             <span class="cell-outer" :class="{ active: property.color === '#FF0000' }" @click="setActiveToolColor('#FF0000')">
               <span class="cell red"></span>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 3 - 4
packages/webview/src/components/DocumentContainer/DocumentContainer.vue