* 修复了日期时间选择框下拉框的按钮配色
This commit is contained in:
parent
1e97e2c9de
commit
ad5b064af0
Binary file not shown.
@ -548,13 +548,19 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetRectColor(Color color)
|
||||
public override void SetStyleColor(UIBaseStyle uiColor)
|
||||
{
|
||||
base.SetRectColor(color);
|
||||
RectColor = color;
|
||||
b1.SymbolColor = b2.SymbolColor = b3.SymbolColor = b4.SymbolColor = color;
|
||||
b1.ForeColor = b2.ForeColor = b3.ForeColor = b4.ForeColor = color;
|
||||
TopPanel.RectColor = p1.RectColor = p2.RectColor = p3.RectColor = color;
|
||||
base.SetStyleColor(uiColor);
|
||||
b1.SetStyleColor(uiColor);
|
||||
b2.SetStyleColor(uiColor);
|
||||
b3.SetStyleColor(uiColor);
|
||||
b4.SetStyleColor(uiColor);
|
||||
|
||||
b1.FillColor = b2.FillColor = b3.FillColor = b4.FillColor = TopPanel.FillColor;
|
||||
RectColor = uiColor.RectColor;
|
||||
b1.SymbolColor = b2.SymbolColor = b3.SymbolColor = b4.SymbolColor = uiColor.RectColor;
|
||||
b1.ForeColor = b2.ForeColor = b3.ForeColor = b4.ForeColor = uiColor.RectColor;
|
||||
TopPanel.RectColor = p1.RectColor = p2.RectColor = p3.RectColor = uiColor.RectColor;
|
||||
}
|
||||
|
||||
private void p2_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
|
||||
@ -741,6 +747,13 @@ namespace Sunny.UI
|
||||
|
||||
private void p3_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||
{
|
||||
if (e.Location.Y <= 30)
|
||||
{
|
||||
activeDay = -1;
|
||||
p3.Invalidate();
|
||||
return;
|
||||
}
|
||||
|
||||
int width = p3.Width / 7;
|
||||
int height = (p3.Height - 30) / 6;
|
||||
int x = e.Location.X / width;
|
||||
@ -758,6 +771,7 @@ namespace Sunny.UI
|
||||
|
||||
private void p3_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||
{
|
||||
if (e.Location.Y <= 30) return;
|
||||
int width = p3.Width / 7;
|
||||
int height = (p3.Height - 30) / 6;
|
||||
int x = e.Location.X / width;
|
||||
|
@ -280,7 +280,7 @@ namespace Sunny.UI
|
||||
this.tabPage2.Controls.Add(this.p2);
|
||||
this.tabPage2.Location = new System.Drawing.Point(0, 40);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Size = new System.Drawing.Size(450, 230);
|
||||
this.tabPage2.Size = new System.Drawing.Size(200, 60);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "tabPage2";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
@ -295,7 +295,7 @@ namespace Sunny.UI
|
||||
this.p2.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.p2.Name = "p2";
|
||||
this.p2.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
|
||||
this.p2.Size = new System.Drawing.Size(450, 230);
|
||||
this.p2.Size = new System.Drawing.Size(200, 60);
|
||||
this.p2.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.p2.TabIndex = 1;
|
||||
this.p2.Text = null;
|
||||
@ -310,7 +310,7 @@ namespace Sunny.UI
|
||||
this.tabPage3.Controls.Add(this.p3);
|
||||
this.tabPage3.Location = new System.Drawing.Point(0, 40);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Size = new System.Drawing.Size(450, 230);
|
||||
this.tabPage3.Size = new System.Drawing.Size(200, 60);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "tabPage3";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
@ -325,7 +325,7 @@ namespace Sunny.UI
|
||||
this.p3.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.p3.Name = "p3";
|
||||
this.p3.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
|
||||
this.p3.Size = new System.Drawing.Size(450, 230);
|
||||
this.p3.Size = new System.Drawing.Size(200, 60);
|
||||
this.p3.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.p3.TabIndex = 2;
|
||||
this.p3.Text = null;
|
||||
@ -632,6 +632,7 @@ namespace Sunny.UI
|
||||
this.uiLine2.FillColor = System.Drawing.Color.White;
|
||||
this.uiLine2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiLine2.LineColor = System.Drawing.Color.Silver;
|
||||
this.uiLine2.LineDashStyle = Sunny.UI.UILineDashStyle.None;
|
||||
this.uiLine2.Location = new System.Drawing.Point(289, 88);
|
||||
this.uiLine2.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine2.Name = "uiLine2";
|
||||
@ -648,6 +649,7 @@ namespace Sunny.UI
|
||||
this.uiLine3.FillColor = System.Drawing.Color.White;
|
||||
this.uiLine3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.uiLine3.LineColor = System.Drawing.Color.Silver;
|
||||
this.uiLine3.LineDashStyle = Sunny.UI.UILineDashStyle.None;
|
||||
this.uiLine3.Location = new System.Drawing.Point(289, 54);
|
||||
this.uiLine3.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine3.Name = "uiLine3";
|
||||
@ -704,6 +706,7 @@ namespace Sunny.UI
|
||||
this.Name = "UIDateTimeItem";
|
||||
this.Size = new System.Drawing.Size(452, 235);
|
||||
this.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.StyleCustomMode = true;
|
||||
this.TopPanel.ResumeLayout(false);
|
||||
this.TabControl.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
@ -955,16 +958,35 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetRectColor(Color color)
|
||||
public override void SetStyleColor(UIBaseStyle uiColor)
|
||||
{
|
||||
base.SetRectColor(color);
|
||||
RectColor = color;
|
||||
b1.ForeColor = b2.ForeColor = b3.ForeColor = b4.ForeColor = color;
|
||||
b1.SymbolColor = b2.SymbolColor = b3.SymbolColor = b4.SymbolColor = color;
|
||||
TopPanel.RectColor = p1.RectColor = p2.RectColor = p3.RectColor = color;
|
||||
h1.ForeColor = h2.ForeColor = color;
|
||||
mm1.ForeColor = mm2.ForeColor = color;
|
||||
s1.ForeColor = s2.ForeColor = color;
|
||||
base.SetStyleColor(uiColor);
|
||||
FillColor = Color.White;
|
||||
b1.SetStyleColor(uiColor);
|
||||
b2.SetStyleColor(uiColor);
|
||||
b3.SetStyleColor(uiColor);
|
||||
b4.SetStyleColor(uiColor);
|
||||
|
||||
h1.SetStyleColor(uiColor);
|
||||
h2.SetStyleColor(uiColor);
|
||||
mm1.SetStyleColor(uiColor);
|
||||
mm2.SetStyleColor(uiColor);
|
||||
s1.SetStyleColor(uiColor);
|
||||
s2.SetStyleColor(uiColor);
|
||||
|
||||
b1.FillColor = b2.FillColor = b3.FillColor = b4.FillColor = TopPanel.FillColor;
|
||||
h1.FillColor = h2.FillColor = mm1.FillColor = mm2.FillColor = s1.FillColor = s2.FillColor = TopPanel.FillColor;
|
||||
|
||||
RectColor = uiColor.RectColor;
|
||||
b1.ForeColor = b2.ForeColor = b3.ForeColor = b4.ForeColor = RectColor;
|
||||
b1.SymbolColor = b2.SymbolColor = b3.SymbolColor = b4.SymbolColor = RectColor;
|
||||
TopPanel.RectColor = p1.RectColor = p2.RectColor = p3.RectColor = RectColor;
|
||||
h1.ForeColor = h2.ForeColor = RectColor;
|
||||
mm1.ForeColor = mm2.ForeColor = RectColor;
|
||||
s1.ForeColor = s2.ForeColor = RectColor;
|
||||
h1.SymbolColor = h2.SymbolColor = RectColor;
|
||||
mm1.SymbolColor = mm2.SymbolColor = RectColor;
|
||||
s1.SymbolColor = s2.SymbolColor = RectColor;
|
||||
}
|
||||
|
||||
public override void SetStyle(UIBaseStyle style)
|
||||
@ -1275,6 +1297,13 @@ namespace Sunny.UI
|
||||
|
||||
private void p3_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||
{
|
||||
if (e.Location.Y <= 30)
|
||||
{
|
||||
activeDay = -1;
|
||||
p3.Invalidate();
|
||||
return;
|
||||
}
|
||||
|
||||
int width = p3.Width / 7;
|
||||
int height = (p3.Height - 30) / 6;
|
||||
int x = e.Location.X / width;
|
||||
@ -1292,6 +1321,7 @@ namespace Sunny.UI
|
||||
|
||||
private void p3_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||
{
|
||||
if (e.Location.Y <= 30) return;
|
||||
int width = p3.Width / 7;
|
||||
int height = (p3.Height - 30) / 6;
|
||||
int x = e.Location.X / width;
|
||||
|
@ -602,13 +602,27 @@ namespace Sunny.UI
|
||||
btnCancel.SetStyleColor(style);
|
||||
}
|
||||
|
||||
public override void SetRectColor(Color color)
|
||||
public override void SetStyleColor(UIBaseStyle uiColor)
|
||||
{
|
||||
base.SetRectColor(color);
|
||||
RectColor = color;
|
||||
h1.ForeColor = h2.ForeColor = color;
|
||||
m1.ForeColor = m2.ForeColor = color;
|
||||
s1.ForeColor = s2.ForeColor = color;
|
||||
base.SetStyleColor(uiColor);
|
||||
|
||||
h1.SetStyleColor(uiColor);
|
||||
h2.SetStyleColor(uiColor);
|
||||
m1.SetStyleColor(uiColor);
|
||||
m2.SetStyleColor(uiColor);
|
||||
s1.SetStyleColor(uiColor);
|
||||
s2.SetStyleColor(uiColor);
|
||||
|
||||
FillColor = Color.White;
|
||||
h1.FillColor = h2.FillColor = m1.FillColor = m2.FillColor = s1.FillColor = s2.FillColor = Color.White;
|
||||
|
||||
RectColor = uiColor.RectColor;
|
||||
h1.ForeColor = h2.ForeColor = RectColor;
|
||||
m1.ForeColor = m2.ForeColor = RectColor;
|
||||
s1.ForeColor = s2.ForeColor = RectColor;
|
||||
h1.SymbolColor = h2.SymbolColor = RectColor;
|
||||
m1.SymbolColor = m2.SymbolColor = RectColor;
|
||||
s1.SymbolColor = s2.SymbolColor = RectColor;
|
||||
}
|
||||
|
||||
private void hc_DoubleClick(object sender, EventArgs e)
|
||||
|
@ -158,6 +158,7 @@ namespace Sunny.UI
|
||||
item.PrimaryColor = RectColor;
|
||||
item.Translate();
|
||||
item.SetDPIScale();
|
||||
item.SetStyleColor(UIStyles.ActiveStyleColor);
|
||||
ItemForm.Show(this);
|
||||
}
|
||||
|
||||
|
@ -153,6 +153,7 @@ namespace Sunny.UI
|
||||
item.PrimaryColor = RectColor;
|
||||
item.Translate();
|
||||
item.SetDPIScale();
|
||||
item.SetStyleColor(UIStyles.ActiveStyleColor);
|
||||
ItemForm.Show(this);
|
||||
}
|
||||
|
||||
|
@ -150,6 +150,7 @@ namespace Sunny.UI
|
||||
item.Time = Value;
|
||||
item.Translate();
|
||||
item.SetDPIScale();
|
||||
item.SetStyleColor(UIStyles.ActiveStyleColor);
|
||||
ItemForm.Show(this);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user