mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-03 02:36:50 +13:00
Use SystemColors in news list control
This commit is contained in:
parent
86df4e4e85
commit
d8008f993c
2 changed files with 8 additions and 4 deletions
1
ShareX/Controls/NewsListControl.Designer.cs
generated
1
ShareX/Controls/NewsListControl.Designer.cs
generated
|
@ -34,6 +34,7 @@ private void InitializeComponent()
|
|||
// tlpMain
|
||||
//
|
||||
this.tlpMain.AutoScroll = true;
|
||||
this.tlpMain.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.tlpMain.ColumnCount = 2;
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
|
|
|
@ -127,11 +127,11 @@ private void TlpMain_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
|
|||
|
||||
if (e.Row.IsEvenNumber())
|
||||
{
|
||||
color = Color.FromArgb(250, 250, 250);
|
||||
color = SystemColors.Window;
|
||||
}
|
||||
else
|
||||
{
|
||||
color = Color.FromArgb(247, 247, 247);
|
||||
color = ColorHelpers.DarkerColor(SystemColors.Window, 0.02f);
|
||||
}
|
||||
|
||||
using (Brush brush = new SolidBrush(color))
|
||||
|
@ -144,7 +144,10 @@ private void TlpMain_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
|
|||
e.Graphics.FillRectangle(Brushes.LimeGreen, new Rectangle(e.CellBounds.X, e.CellBounds.Y, 5, e.CellBounds.Height));
|
||||
}
|
||||
|
||||
e.Graphics.DrawLine(Pens.LightGray, new Point(e.CellBounds.X, e.CellBounds.Bottom - 1), new Point(e.CellBounds.Right - 1, e.CellBounds.Bottom - 1));
|
||||
using (Pen pen = new Pen(ProfessionalColors.SeparatorDark))
|
||||
{
|
||||
e.Graphics.DrawLine(pen, new Point(e.CellBounds.X, e.CellBounds.Bottom - 1), new Point(e.CellBounds.Right - 1, e.CellBounds.Bottom - 1));
|
||||
}
|
||||
}
|
||||
|
||||
public void AddNewsItem(NewsItem item)
|
||||
|
@ -199,7 +202,7 @@ public void AddNewsItem(NewsItem item)
|
|||
{
|
||||
tooltip.SetToolTip(lblText, item.URL);
|
||||
lblText.Cursor = Cursors.Hand;
|
||||
lblText.MouseEnter += (sender, e) => lblText.ForeColor = Color.Blue;
|
||||
lblText.MouseEnter += (sender, e) => lblText.ForeColor = SystemColors.HotTrack;
|
||||
lblText.MouseLeave += (sender, e) => lblText.ForeColor = SystemColors.ControlText;
|
||||
lblText.MouseClick += (sender, e) =>
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue