diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll index 404d2c5c..e653b414 100644 Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ diff --git a/Bin/SunnyUI.pdb b/Bin/SunnyUI.pdb index 4051bb39..6feb9760 100644 Binary files a/Bin/SunnyUI.pdb and b/Bin/SunnyUI.pdb differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe index 1e1c63db..63306c8f 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe and b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.dll b/SunnyUI.Demo/Bin/SunnyUI.dll index 404d2c5c..e653b414 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.dll and b/SunnyUI.Demo/Bin/SunnyUI.dll differ diff --git a/SunnyUI.Demo/Controls/FListBox.Designer.cs b/SunnyUI.Demo/Controls/FListBox.Designer.cs index ae31af34..14b90eef 100644 --- a/SunnyUI.Demo/Controls/FListBox.Designer.cs +++ b/SunnyUI.Demo/Controls/FListBox.Designer.cs @@ -49,11 +49,13 @@ // // uiImageListBox1 // + this.uiImageListBox1.FillColor = System.Drawing.Color.White; this.uiImageListBox1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiImageListBox1.ItemHeight = 80; this.uiImageListBox1.ItemSelectForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); this.uiImageListBox1.Location = new System.Drawing.Point(355, 48); this.uiImageListBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.uiImageListBox1.MinimumSize = new System.Drawing.Size(1, 1); this.uiImageListBox1.Name = "uiImageListBox1"; this.uiImageListBox1.Padding = new System.Windows.Forms.Padding(2); this.uiImageListBox1.Size = new System.Drawing.Size(266, 343); @@ -85,10 +87,12 @@ // // uiListBox1 // + this.uiListBox1.FillColor = System.Drawing.Color.White; this.uiListBox1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiListBox1.ItemSelectForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); this.uiListBox1.Location = new System.Drawing.Point(33, 48); this.uiListBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.uiListBox1.MinimumSize = new System.Drawing.Size(1, 1); this.uiListBox1.Name = "uiListBox1"; this.uiListBox1.Padding = new System.Windows.Forms.Padding(2); this.uiListBox1.Size = new System.Drawing.Size(270, 343); @@ -102,6 +106,7 @@ this.uiCheckBox1.Cursor = System.Windows.Forms.Cursors.Hand; this.uiCheckBox1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiCheckBox1.Location = new System.Drawing.Point(355, 399); + this.uiCheckBox1.MinimumSize = new System.Drawing.Size(1, 1); this.uiCheckBox1.Name = "uiCheckBox1"; this.uiCheckBox1.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0); this.uiCheckBox1.Size = new System.Drawing.Size(266, 35); @@ -114,6 +119,7 @@ this.uiButton1.Cursor = System.Windows.Forms.Cursors.Hand; this.uiButton1.Font = new System.Drawing.Font("微软雅黑", 12F); this.uiButton1.Location = new System.Drawing.Point(33, 400); + this.uiButton1.MinimumSize = new System.Drawing.Size(1, 1); this.uiButton1.Name = "uiButton1"; this.uiButton1.Size = new System.Drawing.Size(100, 35); this.uiButton1.TabIndex = 23; diff --git a/SunnyUI.Demo/Controls/FTreeView.Designer.cs b/SunnyUI.Demo/Controls/FTreeView.Designer.cs index 5ca05edf..918e8bb0 100644 --- a/SunnyUI.Demo/Controls/FTreeView.Designer.cs +++ b/SunnyUI.Demo/Controls/FTreeView.Designer.cs @@ -132,8 +132,6 @@ this.uiTreeView1.SelectedNode = null; this.uiTreeView1.ShowLines = true; this.uiTreeView1.Size = new System.Drawing.Size(266, 313); - this.uiTreeView1.Style = Sunny.UI.UIStyle.Custom; - this.uiTreeView1.StyleCustomMode = true; this.uiTreeView1.TabIndex = 0; this.uiTreeView1.Text = null; // diff --git a/SunnyUI/Controls/UIImageListBox.cs b/SunnyUI/Controls/UIImageListBox.cs index 3c94d03e..816e3a21 100644 --- a/SunnyUI/Controls/UIImageListBox.cs +++ b/SunnyUI/Controls/UIImageListBox.cs @@ -66,6 +66,20 @@ namespace Sunny.UI listbox.MouseMove += Listbox_MouseMove; } + protected override void AfterSetFillColor(Color color) + { + base.AfterSetFillColor(color); + if (listbox != null) + { + listbox.BackColor = color; + } + + if (bar != null) + { + bar.FillColor = color; + } + } + private void Listbox_MouseMove(object sender, MouseEventArgs e) { MouseMove?.Invoke(this, e); @@ -187,7 +201,10 @@ namespace Sunny.UI { listbox.HoverColor = hoverColor; listbox.SetStyleColor(uiColor); + listbox.BackColor = Color.White; } + + fillColor = Color.White; } private int LastCount; diff --git a/SunnyUI/Controls/UIListBox.cs b/SunnyUI/Controls/UIListBox.cs index 5722a344..8dd7ddb6 100644 --- a/SunnyUI/Controls/UIListBox.cs +++ b/SunnyUI/Controls/UIListBox.cs @@ -26,7 +26,6 @@ using System; using System.ComponentModel; using System.Drawing; using System.Drawing.Design; -using System.Drawing.Drawing2D; using System.Windows.Forms; namespace Sunny.UI @@ -188,6 +187,23 @@ namespace Sunny.UI { listbox.HoverColor = hoverColor; listbox.SetStyleColor(uiColor); + listbox.BackColor = Color.White; + } + + fillColor = Color.White; + } + + protected override void AfterSetFillColor(Color color) + { + base.AfterSetFillColor(color); + if (listbox != null) + { + listbox.BackColor = color; + } + + if (bar != null) + { + bar.FillColor = color; } } @@ -213,11 +229,6 @@ namespace Sunny.UI Padding = new Padding(Math.Max(2, value / 2)); } - protected override void OnPaintFill(Graphics g, GraphicsPath path) - { - g.Clear(Color.White); - } - [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] [Localizable(true)] [Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]