Fixed text align on checkboxes and radiobuttons.

This commit is contained in:
Robin 2015-12-07 18:41:05 +00:00
parent 4661e00705
commit f68f5c2197
3 changed files with 13 additions and 13 deletions

View File

@ -319,7 +319,7 @@ namespace DarkUI.Controls
using (var p = new Pen(borderColor))
{
var boxRect = new Rectangle(0, (rect.Height / 2) - (size / 2) - 1, size, size);
var boxRect = new Rectangle(0, (rect.Height / 2) - (size / 2), size, size);
g.DrawRectangle(p, boxRect);
}
@ -327,7 +327,7 @@ namespace DarkUI.Controls
{
using (var b = new SolidBrush(fillColor))
{
Rectangle boxRect = new Rectangle(2, (rect.Height / 2) - ((size - 4) / 2) - 1, size - 3, size - 3);
Rectangle boxRect = new Rectangle(2, (rect.Height / 2) - ((size - 4) / 2), size - 3, size - 3);
g.FillRectangle(b, boxRect);
}
}
@ -336,8 +336,8 @@ namespace DarkUI.Controls
{
var stringFormat = new StringFormat
{
LineAlignment = StringAlignment.Near,
Alignment = StringAlignment.Center
LineAlignment = StringAlignment.Center,
Alignment = StringAlignment.Near
};
var modRect = new Rectangle(size + 4, 0, rect.Width - size, rect.Height);

View File

@ -315,7 +315,7 @@ namespace DarkUI.Controls
using (var p = new Pen(borderColor))
{
var boxRect = new Rectangle(0, (rect.Height / 2) - (size / 2) - 1, size, size);
var boxRect = new Rectangle(0, (rect.Height / 2) - (size / 2), size, size);
g.DrawEllipse(p, boxRect);
}
@ -323,7 +323,7 @@ namespace DarkUI.Controls
{
using (var b = new SolidBrush(fillColor))
{
Rectangle boxRect = new Rectangle(3, (rect.Height / 2) - ((size - 7) / 2) - 2, size - 6, size - 6);
Rectangle boxRect = new Rectangle(3, (rect.Height / 2) - ((size - 7) / 2) - 1, size - 6, size - 6);
g.FillEllipse(b, boxRect);
}
}
@ -334,8 +334,8 @@ namespace DarkUI.Controls
{
var stringFormat = new StringFormat
{
LineAlignment = StringAlignment.Near,
Alignment = StringAlignment.Center
LineAlignment = StringAlignment.Center,
Alignment = StringAlignment.Near
};
var modRect = new Rectangle(size + 4, 0, rect.Width - size, rect.Height);

View File

@ -168,7 +168,7 @@ namespace Example
this.panel5.Controls.Add(this.darkRadioButton1);
this.panel5.Controls.Add(this.darkTitle3);
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
this.panel5.Location = new System.Drawing.Point(10, 190);
this.panel5.Location = new System.Drawing.Point(10, 185);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(200, 100);
this.panel5.TabIndex = 12;
@ -222,7 +222,7 @@ namespace Example
this.panel4.Controls.Add(this.darkCheckBox1);
this.panel4.Controls.Add(this.darkTitle2);
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
this.panel4.Location = new System.Drawing.Point(10, 116);
this.panel4.Location = new System.Drawing.Point(10, 111);
this.panel4.Name = "panel4";
this.panel4.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
this.panel4.Size = new System.Drawing.Size(200, 74);
@ -265,7 +265,7 @@ namespace Example
this.panel3.AutoSize = true;
this.panel3.Controls.Add(this.btnMessageBox);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(10, 76);
this.panel3.Location = new System.Drawing.Point(10, 71);
this.panel3.Name = "panel3";
this.panel3.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
this.panel3.Size = new System.Drawing.Size(200, 40);
@ -289,8 +289,8 @@ namespace Example
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(10, 10);
this.panel2.Name = "panel2";
this.panel2.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
this.panel2.Size = new System.Drawing.Size(200, 66);
this.panel2.Padding = new System.Windows.Forms.Padding(0, 0, 0, 5);
this.panel2.Size = new System.Drawing.Size(200, 61);
this.panel2.TabIndex = 5;
//
// btnDialog