Interim commit for recent colors support

This commit is contained in:
Jaex 2018-04-19 21:59:02 +03:00
parent 0dbaa2e676
commit 6fc4410e8a
4 changed files with 331 additions and 117 deletions

View file

@ -68,6 +68,7 @@ private void InitializeComponent()
this.nudAlpha = new System.Windows.Forms.NumericUpDown();
this.lblAlpha = new System.Windows.Forms.Label();
this.ttMain = new System.Windows.Forms.ToolTip(this.components);
this.cbTransparent = new ShareX.HelpersLib.ColorButton();
this.cmsCopy = new System.Windows.Forms.ContextMenuStrip(this.components);
this.tsmiCopyAll = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiCopyRGB = new System.Windows.Forms.ToolStripMenuItem();
@ -77,17 +78,19 @@ private void InitializeComponent()
this.tsmiCopyDecimal = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiCopyPosition = new System.Windows.Forms.ToolStripMenuItem();
this.pSceenColorPicker = new System.Windows.Forms.Panel();
this.btnPickColor = new System.Windows.Forms.Button();
this.txtY = new System.Windows.Forms.TextBox();
this.txtX = new System.Windows.Forms.TextBox();
this.lblY = new System.Windows.Forms.Label();
this.lblX = new System.Windows.Forms.Label();
this.lblCursorPosition = new System.Windows.Forms.Label();
this.btnClose = new System.Windows.Forms.Button();
this.btnPickColor = new System.Windows.Forms.Button();
this.mbCopy = new ShareX.HelpersLib.MenuButton();
this.cbTransparent = new ShareX.HelpersLib.ColorButton();
this.pbColorPreview = new ShareX.HelpersLib.MyPictureBox();
this.colorPicker = new ShareX.HelpersLib.ColorPicker();
this.pColorPicker = new System.Windows.Forms.Panel();
this.lblRecentColors = new System.Windows.Forms.Label();
this.flpRecentColors = new System.Windows.Forms.FlowLayoutPanel();
((System.ComponentModel.ISupportInitialize)(this.nudKey)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudYellow)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudMagenta)).BeginInit();
@ -101,6 +104,7 @@ private void InitializeComponent()
((System.ComponentModel.ISupportInitialize)(this.nudAlpha)).BeginInit();
this.cmsCopy.SuspendLayout();
this.pSceenColorPicker.SuspendLayout();
this.pColorPicker.SuspendLayout();
this.SuspendLayout();
//
// btnCancel
@ -410,6 +414,16 @@ private void InitializeComponent()
this.ttMain.InitialDelay = 100;
this.ttMain.ReshowDelay = 100;
//
// cbTransparent
//
this.cbTransparent.Color = System.Drawing.Color.Transparent;
resources.ApplyResources(this.cbTransparent, "cbTransparent");
this.cbTransparent.ManualButtonClick = true;
this.cbTransparent.Name = "cbTransparent";
this.ttMain.SetToolTip(this.cbTransparent, resources.GetString("cbTransparent.ToolTip"));
this.cbTransparent.UseVisualStyleBackColor = true;
this.cbTransparent.Click += new System.EventHandler(this.cbTransparent_Click);
//
// cmsCopy
//
this.cmsCopy.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -477,6 +491,13 @@ private void InitializeComponent()
resources.ApplyResources(this.pSceenColorPicker, "pSceenColorPicker");
this.pSceenColorPicker.Name = "pSceenColorPicker";
//
// btnPickColor
//
resources.ApplyResources(this.btnPickColor, "btnPickColor");
this.btnPickColor.Name = "btnPickColor";
this.btnPickColor.UseVisualStyleBackColor = true;
this.btnPickColor.Click += new System.EventHandler(this.btnPickColor_Click);
//
// txtY
//
resources.ApplyResources(this.txtY, "txtY");
@ -511,13 +532,6 @@ private void InitializeComponent()
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnPickColor
//
resources.ApplyResources(this.btnPickColor, "btnPickColor");
this.btnPickColor.Name = "btnPickColor";
this.btnPickColor.UseVisualStyleBackColor = true;
this.btnPickColor.Click += new System.EventHandler(this.btnPickColor_Click);
//
// mbCopy
//
resources.ApplyResources(this.mbCopy, "mbCopy");
@ -525,17 +539,6 @@ private void InitializeComponent()
this.mbCopy.Name = "mbCopy";
this.mbCopy.UseVisualStyleBackColor = true;
//
// cbTransparent
//
this.cbTransparent.Color = System.Drawing.Color.Transparent;
resources.ApplyResources(this.cbTransparent, "cbTransparent");
this.cbTransparent.ManualButtonClick = true;
this.cbTransparent.Name = "cbTransparent";
this.cbTransparent.Offset = 3;
this.ttMain.SetToolTip(this.cbTransparent, resources.GetString("cbTransparent.ToolTip"));
this.cbTransparent.UseVisualStyleBackColor = true;
this.cbTransparent.Click += new System.EventHandler(this.cbTransparent_Click);
//
// pbColorPreview
//
this.pbColorPreview.BackColor = System.Drawing.SystemColors.Window;
@ -552,12 +555,30 @@ private void InitializeComponent()
this.colorPicker.Name = "colorPicker";
this.colorPicker.ColorChanged += new ShareX.HelpersLib.ColorEventHandler(this.colorPicker_ColorChanged);
//
// pColorPicker
//
this.pColorPicker.Controls.Add(this.lblRecentColors);
this.pColorPicker.Controls.Add(this.flpRecentColors);
resources.ApplyResources(this.pColorPicker, "pColorPicker");
this.pColorPicker.Name = "pColorPicker";
//
// lblRecentColors
//
resources.ApplyResources(this.lblRecentColors, "lblRecentColors");
this.lblRecentColors.Name = "lblRecentColors";
//
// flpRecentColors
//
resources.ApplyResources(this.flpRecentColors, "flpRecentColors");
this.flpRecentColors.Name = "flpRecentColors";
//
// ColorPickerForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.SystemColors.Window;
this.CancelButton = this.btnCancel;
resources.ApplyResources(this, "$this");
this.Controls.Add(this.pColorPicker);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.pSceenColorPicker);
this.Controls.Add(this.mbCopy);
@ -619,6 +640,8 @@ private void InitializeComponent()
this.cmsCopy.ResumeLayout(false);
this.pSceenColorPicker.ResumeLayout(false);
this.pSceenColorPicker.PerformLayout();
this.pColorPicker.ResumeLayout(false);
this.pColorPicker.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -684,5 +707,8 @@ private void InitializeComponent()
private System.Windows.Forms.TextBox txtY;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnPickColor;
private System.Windows.Forms.Panel pColorPicker;
private System.Windows.Forms.FlowLayoutPanel flpRecentColors;
private System.Windows.Forms.Label lblRecentColors;
}
}

View file

@ -50,8 +50,13 @@ public ColorPickerForm(Color currentColor, bool isScreenColorPickerMode = false)
SetCurrentColor(currentColor, !IsScreenColorPickerMode);
btnOK.Visible = btnCancel.Visible = !IsScreenColorPickerMode;
btnOK.Visible = btnCancel.Visible = pColorPicker.Visible = !IsScreenColorPickerMode;
mbCopy.Visible = btnClose.Visible = pSceenColorPicker.Visible = IsScreenColorPickerMode;
if (!IsScreenColorPickerMode)
{
PrepareRecentColors();
}
}
public void EnableScreenColorPickerButton(Func<PointInfo> openScreenColorPicker)
@ -75,6 +80,26 @@ public static bool PickColor(Color currentColor, out Color newColor)
return false;
}
private void PrepareRecentColors()
{
for (int i = 0; i < 32; i++)
{
ColorButton colorButton = new ColorButton()
{
Color = new HSB(i / 32d, 1d, 1d),
Size = new Size(16, 16),
Offset = 2,
Margin = new Padding(0),
ManualButtonClick = true
};
colorButton.Click += (sender, e) => SetCurrentColor(colorButton.Color, true);
flpRecentColors.Controls.Add(colorButton);
if ((i + 1) % 16 == 0) flpRecentColors.SetFlowBreak(colorButton, true);
}
}
public void SetCurrentColor(Color currentColor, bool keepPreviousColor)
{
oldColorExist = keepPreviousColor;

View file

@ -123,7 +123,7 @@
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnCancel.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 232</value>
<value>560, 288</value>
</data>
<data name="btnCancel.Size" type="System.Drawing.Size, System.Drawing">
<value>72, 32</value>
@ -145,13 +145,13 @@
<value>$this</value>
</data>
<data name="&gt;&gt;btnCancel.ZOrder" xml:space="preserve">
<value>21</value>
<value>22</value>
</data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>480, 232</value>
<value>480, 288</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>72, 32</value>
@ -172,7 +172,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>22</value>
<value>23</value>
</data>
<data name="lblOld.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -202,7 +202,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblOld.ZOrder" xml:space="preserve">
<value>23</value>
<value>24</value>
</data>
<data name="lblNew.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -232,7 +232,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblNew.ZOrder" xml:space="preserve">
<value>24</value>
<value>25</value>
</data>
<data name="txtHex.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 174</value>
@ -262,7 +262,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;txtHex.ZOrder" xml:space="preserve">
<value>25</value>
<value>26</value>
</data>
<data name="lblHex.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -292,7 +292,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblHex.ZOrder" xml:space="preserve">
<value>26</value>
<value>27</value>
</data>
<data name="nudKey.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 142</value>
@ -316,7 +316,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudKey.ZOrder" xml:space="preserve">
<value>27</value>
<value>28</value>
</data>
<data name="nudYellow.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 108</value>
@ -340,7 +340,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudYellow.ZOrder" xml:space="preserve">
<value>28</value>
<value>29</value>
</data>
<data name="nudMagenta.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 78</value>
@ -364,7 +364,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudMagenta.ZOrder" xml:space="preserve">
<value>29</value>
<value>30</value>
</data>
<data name="nudCyan.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 46</value>
@ -388,7 +388,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudCyan.ZOrder" xml:space="preserve">
<value>30</value>
<value>31</value>
</data>
<data name="lblKey.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -418,7 +418,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblKey.ZOrder" xml:space="preserve">
<value>31</value>
<value>32</value>
</data>
<data name="lblYellow.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -448,7 +448,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblYellow.ZOrder" xml:space="preserve">
<value>32</value>
<value>33</value>
</data>
<data name="lblMagenta.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -478,7 +478,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblMagenta.ZOrder" xml:space="preserve">
<value>33</value>
<value>34</value>
</data>
<data name="lblCyan.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -508,7 +508,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblCyan.ZOrder" xml:space="preserve">
<value>34</value>
<value>35</value>
</data>
<data name="lblHue.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -541,7 +541,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblHue.ZOrder" xml:space="preserve">
<value>35</value>
<value>36</value>
</data>
<data name="lblBrightnessPerc.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -574,7 +574,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblBrightnessPerc.ZOrder" xml:space="preserve">
<value>36</value>
<value>37</value>
</data>
<data name="lblSaturationPerc.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -607,7 +607,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblSaturationPerc.ZOrder" xml:space="preserve">
<value>37</value>
<value>38</value>
</data>
<data name="nudBlue.Location" type="System.Drawing.Point, System.Drawing">
<value>408, 78</value>
@ -631,7 +631,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudBlue.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="nudGreen.Location" type="System.Drawing.Point, System.Drawing">
<value>408, 46</value>
@ -655,7 +655,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudGreen.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="nudRed.Location" type="System.Drawing.Point, System.Drawing">
<value>408, 14</value>
@ -679,7 +679,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudRed.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="nudBrightness.Location" type="System.Drawing.Point, System.Drawing">
<value>408, 174</value>
@ -703,7 +703,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudBrightness.ZOrder" xml:space="preserve">
<value>38</value>
<value>39</value>
</data>
<data name="nudSaturation.Location" type="System.Drawing.Point, System.Drawing">
<value>408, 142</value>
@ -727,7 +727,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudSaturation.ZOrder" xml:space="preserve">
<value>39</value>
<value>40</value>
</data>
<data name="nudHue.Location" type="System.Drawing.Point, System.Drawing">
<value>408, 108</value>
@ -751,7 +751,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudHue.ZOrder" xml:space="preserve">
<value>40</value>
<value>41</value>
</data>
<data name="rbBlue.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -781,7 +781,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;rbBlue.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<data name="rbGreen.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -811,7 +811,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;rbGreen.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<data name="rbRed.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -841,7 +841,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;rbRed.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="rbBrightness.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -871,7 +871,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;rbBrightness.ZOrder" xml:space="preserve">
<value>41</value>
<value>42</value>
</data>
<data name="rbSaturation.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -901,7 +901,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;rbSaturation.ZOrder" xml:space="preserve">
<value>42</value>
<value>43</value>
</data>
<data name="rbHue.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -931,7 +931,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;rbHue.ZOrder" xml:space="preserve">
<value>43</value>
<value>44</value>
</data>
<data name="lblDecimal.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -961,7 +961,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblDecimal.ZOrder" xml:space="preserve">
<value>19</value>
<value>20</value>
</data>
<data name="txtDecimal.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 204</value>
@ -988,7 +988,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;txtDecimal.ZOrder" xml:space="preserve">
<value>18</value>
<value>19</value>
</data>
<data name="lblCyanPerc.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1021,7 +1021,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblCyanPerc.ZOrder" xml:space="preserve">
<value>17</value>
<value>18</value>
</data>
<data name="lblMagentaPerc.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1054,7 +1054,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblMagentaPerc.ZOrder" xml:space="preserve">
<value>16</value>
<value>17</value>
</data>
<data name="lblYellowPerc.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1087,7 +1087,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblYellowPerc.ZOrder" xml:space="preserve">
<value>15</value>
<value>16</value>
</data>
<data name="lblKeyPerc.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1120,7 +1120,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblKeyPerc.ZOrder" xml:space="preserve">
<value>14</value>
<value>15</value>
</data>
<data name="nudAlpha.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 14</value>
@ -1144,7 +1144,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;nudAlpha.ZOrder" xml:space="preserve">
<value>13</value>
<value>14</value>
</data>
<data name="lblAlpha.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1174,11 +1174,38 @@
<value>$this</value>
</data>
<data name="&gt;&gt;lblAlpha.ZOrder" xml:space="preserve">
<value>12</value>
<value>13</value>
</data>
<metadata name="ttMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="cbTransparent.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbTransparent.Location" type="System.Drawing.Point, System.Drawing">
<value>612, 13</value>
</data>
<data name="cbTransparent.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 23</value>
</data>
<data name="cbTransparent.TabIndex" type="System.Int32, mscorlib">
<value>39</value>
</data>
<data name="cbTransparent.ToolTip" xml:space="preserve">
<value>Transparent</value>
</data>
<data name="&gt;&gt;cbTransparent.Name" xml:space="preserve">
<value>cbTransparent</value>
</data>
<data name="&gt;&gt;cbTransparent.Type" xml:space="preserve">
<value>ShareX.HelpersLib.ColorButton, ShareX.HelpersLib, Version=12.2.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;cbTransparent.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;cbTransparent.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<metadata name="cmsCopy.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>104, 17</value>
</metadata>
@ -1233,6 +1260,99 @@
<data name="tsmiCopyPosition.Text" xml:space="preserve">
<value>Copy position</value>
</data>
<data name="&gt;&gt;btnPickColor.Name" xml:space="preserve">
<value>btnPickColor</value>
</data>
<data name="&gt;&gt;btnPickColor.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnPickColor.Parent" xml:space="preserve">
<value>pSceenColorPicker</value>
</data>
<data name="&gt;&gt;btnPickColor.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;txtY.Name" xml:space="preserve">
<value>txtY</value>
</data>
<data name="&gt;&gt;txtY.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtY.Parent" xml:space="preserve">
<value>pSceenColorPicker</value>
</data>
<data name="&gt;&gt;txtY.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;txtX.Name" xml:space="preserve">
<value>txtX</value>
</data>
<data name="&gt;&gt;txtX.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtX.Parent" xml:space="preserve">
<value>pSceenColorPicker</value>
</data>
<data name="&gt;&gt;txtX.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;lblY.Name" xml:space="preserve">
<value>lblY</value>
</data>
<data name="&gt;&gt;lblY.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblY.Parent" xml:space="preserve">
<value>pSceenColorPicker</value>
</data>
<data name="&gt;&gt;lblY.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;lblX.Name" xml:space="preserve">
<value>lblX</value>
</data>
<data name="&gt;&gt;lblX.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblX.Parent" xml:space="preserve">
<value>pSceenColorPicker</value>
</data>
<data name="&gt;&gt;lblX.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;lblCursorPosition.Name" xml:space="preserve">
<value>lblCursorPosition</value>
</data>
<data name="&gt;&gt;lblCursorPosition.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblCursorPosition.Parent" xml:space="preserve">
<value>pSceenColorPicker</value>
</data>
<data name="&gt;&gt;lblCursorPosition.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="pSceenColorPicker.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 272</value>
</data>
<data name="pSceenColorPicker.Size" type="System.Drawing.Size, System.Drawing">
<value>296, 56</value>
</data>
<data name="pSceenColorPicker.TabIndex" type="System.Int32, mscorlib">
<value>42</value>
</data>
<data name="&gt;&gt;pSceenColorPicker.Name" xml:space="preserve">
<value>pSceenColorPicker</value>
</data>
<data name="&gt;&gt;pSceenColorPicker.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pSceenColorPicker.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pSceenColorPicker.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="btnPickColor.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
@ -1404,32 +1524,11 @@
<data name="&gt;&gt;lblCursorPosition.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="pSceenColorPicker.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 272</value>
</data>
<data name="pSceenColorPicker.Size" type="System.Drawing.Size, System.Drawing">
<value>296, 56</value>
</data>
<data name="pSceenColorPicker.TabIndex" type="System.Int32, mscorlib">
<value>42</value>
</data>
<data name="&gt;&gt;pSceenColorPicker.Name" xml:space="preserve">
<value>pSceenColorPicker</value>
</data>
<data name="&gt;&gt;pSceenColorPicker.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pSceenColorPicker.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pSceenColorPicker.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnClose.Location" type="System.Drawing.Point, System.Drawing">
<value>560, 232</value>
<value>560, 288</value>
</data>
<data name="btnClose.Size" type="System.Drawing.Size, System.Drawing">
<value>72, 32</value>
@ -1450,13 +1549,13 @@
<value>$this</value>
</data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="mbCopy.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="mbCopy.Location" type="System.Drawing.Point, System.Drawing">
<value>472, 232</value>
<value>472, 288</value>
</data>
<data name="mbCopy.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 32</value>
@ -1477,33 +1576,6 @@
<value>$this</value>
</data>
<data name="&gt;&gt;mbCopy.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="cbTransparent.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbTransparent.Location" type="System.Drawing.Point, System.Drawing">
<value>612, 13</value>
</data>
<data name="cbTransparent.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 23</value>
</data>
<data name="cbTransparent.TabIndex" type="System.Int32, mscorlib">
<value>39</value>
</data>
<data name="cbTransparent.ToolTip" xml:space="preserve">
<value>Transparent</value>
</data>
<data name="&gt;&gt;cbTransparent.Name" xml:space="preserve">
<value>cbTransparent</value>
</data>
<data name="&gt;&gt;cbTransparent.Type" xml:space="preserve">
<value>ShareX.HelpersLib.ColorButton, ShareX.HelpersLib, Version=12.2.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;cbTransparent.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;cbTransparent.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="pbColorPreview.Location" type="System.Drawing.Point, System.Drawing">
@ -1525,7 +1597,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;pbColorPreview.ZOrder" xml:space="preserve">
<value>11</value>
<value>12</value>
</data>
<data name="colorPicker.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -1549,16 +1621,106 @@
<value>$this</value>
</data>
<data name="&gt;&gt;colorPicker.ZOrder" xml:space="preserve">
<value>20</value>
<value>21</value>
</data>
<data name="&gt;&gt;lblRecentColors.Name" xml:space="preserve">
<value>lblRecentColors</value>
</data>
<data name="&gt;&gt;lblRecentColors.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblRecentColors.Parent" xml:space="preserve">
<value>pColorPicker</value>
</data>
<data name="&gt;&gt;lblRecentColors.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;flpRecentColors.Name" xml:space="preserve">
<value>flpRecentColors</value>
</data>
<data name="&gt;&gt;flpRecentColors.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;flpRecentColors.Parent" xml:space="preserve">
<value>pColorPicker</value>
</data>
<data name="&gt;&gt;flpRecentColors.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="pColorPicker.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 271</value>
</data>
<data name="pColorPicker.Size" type="System.Drawing.Size, System.Drawing">
<value>296, 56</value>
</data>
<data name="pColorPicker.TabIndex" type="System.Int32, mscorlib">
<value>44</value>
</data>
<data name="&gt;&gt;pColorPicker.Name" xml:space="preserve">
<value>pColorPicker</value>
</data>
<data name="&gt;&gt;pColorPicker.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pColorPicker.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pColorPicker.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="lblRecentColors.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblRecentColors.Location" type="System.Drawing.Point, System.Drawing">
<value>-3, 0</value>
</data>
<data name="lblRecentColors.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 13</value>
</data>
<data name="lblRecentColors.TabIndex" type="System.Int32, mscorlib">
<value>45</value>
</data>
<data name="lblRecentColors.Text" xml:space="preserve">
<value>Recent colors:</value>
</data>
<data name="&gt;&gt;lblRecentColors.Name" xml:space="preserve">
<value>lblRecentColors</value>
</data>
<data name="&gt;&gt;lblRecentColors.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblRecentColors.Parent" xml:space="preserve">
<value>pColorPicker</value>
</data>
<data name="&gt;&gt;lblRecentColors.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="flpRecentColors.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 16</value>
</data>
<data name="flpRecentColors.Size" type="System.Drawing.Size, System.Drawing">
<value>296, 40</value>
</data>
<data name="flpRecentColors.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;flpRecentColors.Name" xml:space="preserve">
<value>flpRecentColors</value>
</data>
<data name="&gt;&gt;flpRecentColors.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;flpRecentColors.Parent" xml:space="preserve">
<value>pColorPicker</value>
</data>
<data name="&gt;&gt;flpRecentColors.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>642, 327</value>
</data>
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
<value>640, 328</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterScreen</value>

View file

@ -51,6 +51,7 @@ public Color Color
}
}
[DefaultValue(3)]
public int Offset { get; set; } = 3;
[DefaultValue(false)]