diff --git a/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.Designer.cs b/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.Designer.cs index e1519c827..0c66626ba 100644 --- a/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.Designer.cs +++ b/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.Designer.cs @@ -51,6 +51,7 @@ private void InitializeComponent() this.tsmiAlignmentTop = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiAlignmentMiddle = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiAlignmentBottom = new System.Windows.Forms.ToolStripMenuItem(); + this.lblTip = new System.Windows.Forms.Label(); this.flpProperties.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudTextSize)).BeginInit(); this.cmsAlignmentHorizontal.SuspendLayout(); @@ -64,6 +65,7 @@ private void InitializeComponent() this.txtInput.Name = "txtInput"; this.txtInput.TextChanged += new System.EventHandler(this.txtInput_TextChanged); this.txtInput.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtInput_KeyDown); + this.txtInput.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtInput_KeyUp); // // btnTextColor // @@ -229,11 +231,17 @@ private void InitializeComponent() resources.ApplyResources(this.tsmiAlignmentBottom, "tsmiAlignmentBottom"); this.tsmiAlignmentBottom.Click += new System.EventHandler(this.tsmiAlignmentBottom_Click); // + // lblTip + // + resources.ApplyResources(this.lblTip, "lblTip"); + this.lblTip.Name = "lblTip"; + // // TextDrawingInputBox // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.Window; + this.Controls.Add(this.lblTip); this.Controls.Add(this.btnOK); this.Controls.Add(this.flpProperties); this.Controls.Add(this.txtInput); @@ -276,5 +284,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem tsmiAlignmentTop; private System.Windows.Forms.ToolStripMenuItem tsmiAlignmentMiddle; private System.Windows.Forms.ToolStripMenuItem tsmiAlignmentBottom; + private System.Windows.Forms.Label lblTip; } } \ No newline at end of file diff --git a/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.cs b/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.cs index 78ad60acd..be4ee0542 100644 --- a/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.cs +++ b/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.cs @@ -165,7 +165,15 @@ private void tsmiAlignmentBottom_Click(object sender, EventArgs e) private void txtInput_KeyDown(object sender, KeyEventArgs e) { - if (e.KeyData == (Keys.Control | Keys.Enter)) + if (e.KeyData == Keys.Enter) + { + e.SuppressKeyPress = true; + } + } + + private void txtInput_KeyUp(object sender, KeyEventArgs e) + { + if (e.KeyData == Keys.Enter) { Close(); } diff --git a/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.resx b/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.resx index 5821acf8f..22c8776c2 100644 --- a/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.resx +++ b/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.resx @@ -148,7 +148,7 @@ $this - 4 + 5 Left @@ -448,7 +448,7 @@ $this - 3 + 4 Bottom, Right @@ -475,7 +475,7 @@ $this - 2 + 3 17, 17 @@ -537,6 +537,33 @@ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + 5, 334 + + + 106, 13 + + + 4 + + + New line: Ctrl + Enter + + + lblTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + True