Skip to content

Commit

Permalink
fixed ForeColor in FileDialog for displaying additional files info;
Browse files Browse the repository at this point in the history
  • Loading branch information
Meragon committed Jul 10, 2019
1 parent 1fa323a commit ddbf07f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions System/Windows/Forms/Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -898,9 +898,9 @@ protected virtual void OnMouseWheel(MouseEventArgs e)
protected virtual void OnPaint(PaintEventArgs e)
{
}
protected virtual void OnPaintBackground(PaintEventArgs pevent)
protected virtual void OnPaintBackground(PaintEventArgs e)
{
PaintBackground(pevent, ClientRectangle);
PaintBackground(e, ClientRectangle);
}
protected virtual void OnParentChanged(EventArgs e)
{
Expand Down
8 changes: 6 additions & 2 deletions System/Windows/Forms/FileDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,15 @@ protected override void OnDrawNode(DrawTreeNodeEventArgs e)
var fInfo = info.Info;
if (fInfo == null)
return;

var foreColor = e.Node.ForeColor;
if (foreColor.IsEmpty)
foreColor = ForeColor;

e.Graphics.uwfDrawString(
fInfo.LastWriteTime.ToString("dd.MM.yyyy HH:mm"),
Font,
e.Node.ForeColor,
foreColor,
selectionBounds.X + 440,
selectionBounds.Y,
200,
Expand All @@ -587,7 +591,7 @@ protected override void OnDrawNode(DrawTreeNodeEventArgs e)
e.Graphics.uwfDrawString(
info.sizeStr,
Font,
e.Node.ForeColor,
foreColor,
selectionBounds.X + 400,
selectionBounds.Y,
selectionBounds.Width - 412,
Expand Down
12 changes: 2 additions & 10 deletions System/Windows/Forms/Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,8 @@ protected override void OnMouseMove(MouseEventArgs e)
}
protected override void OnPaint(PaintEventArgs e)
{
var g = e.Graphics;
var headerHeight = uwfHeaderHeight;
var width = Width;

// Background color.
g.uwfFillRectangle(BackColor, 0, headerHeight, width, Height - headerHeight);
e.Graphics.uwfFillRectangle(BackColor, 0, uwfHeaderHeight, Width, Height - uwfHeaderHeight);
}
protected virtual void OnShown(EventArgs e)
{
Expand Down Expand Up @@ -608,11 +604,7 @@ protected override void OnVisibleChanged(EventArgs e)

base.OnVisibleChanged(e);
}
protected override void SetBoundsCore(int newX, int newY, int newWidth, int newHeight, BoundsSpecified specified)
{
base.SetBoundsCore(newX, newY, newWidth, newHeight, specified);
}


private void DrawShadow(PaintEventArgs e)
{
var loc = uwfShadowPointToScreen(Location);
Expand Down

0 comments on commit ddbf07f

Please sign in to comment.