From 64598f1e8fe5fd56829380da6b65e436a76f8dbd Mon Sep 17 00:00:00 2001 From: Heiko Joerg Schick Date: Mon, 10 Mar 2025 21:47:19 +0100 Subject: [PATCH] Minor improvment for DRAFT watermark --- src/taskpane/components/DraftButtons.tsx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/taskpane/components/DraftButtons.tsx b/src/taskpane/components/DraftButtons.tsx index 565c1658..71a3d952 100644 --- a/src/taskpane/components/DraftButtons.tsx +++ b/src/taskpane/components/DraftButtons.tsx @@ -63,9 +63,11 @@ export const DraftButtons: React.FC = () => { // Create the textbox on the master slide const textBox = master.shapes.addTextBox(""); - textBox.left = 0; // Center it horizontally - textBox.top = 0; - textBox.width = 960; + // textBox.left = 0; // Center it horizontally + textBox.left = -275 + textBox.top = -5; + // textBox.width = 960; + textBox.width = 2400; textBox.height = 540; await context.sync(); @@ -91,7 +93,8 @@ export const DraftButtons: React.FC = () => { // Set font properties exactly as in the VBA code textBox.textFrame.textRange.font.name = "Inter"; - textBox.textFrame.textRange.font.size = 256; + // textBox.textFrame.textRange.font.size = 256; + textBox.textFrame.textRange.font.size = 64; textBox.textFrame.textRange.font.bold = true; textBox.textFrame.verticalAlignment = "MiddleCentered" @@ -100,7 +103,16 @@ export const DraftButtons: React.FC = () => { textBox.textFrame.textRange.font.color = "#FFE9E8"; // Set the text - textBox.textFrame.textRange.text = "DRAFT"; + textBox.textFrame.textRange.text = + "DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" + + "DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" + + "DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" + + "DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" + + "DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" + + "DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" + + "DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" + + "DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n" + + "DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT\n"; } catch (fontError) { console.error("Error setting font properties:", fontError); // Even if we can't set the font properties exactly, continue with default font