Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaier committed Oct 20, 2014
1 parent ff9604e commit 320171b
Show file tree
Hide file tree
Showing 68 changed files with 735 additions and 399 deletions.
16 changes: 11 additions & 5 deletions NMaier.Windows.Forms/ToolStripRealSystemRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
***/

using System;
using System.Collections.Generic;
using System.Drawing;
Expand Down Expand Up @@ -245,7 +246,8 @@ private Color GetItemTextColor(ToolStripItem item)
return renderer.GetColor(ColorProperty.TextColor);
}

private Padding GetThemeMargins(IDeviceContext dc, MarginProperty marginType)
private Padding GetThemeMargins(IDeviceContext dc,
MarginProperty marginType)
{
NativeMethods.MARGINS margins;
try {
Expand Down Expand Up @@ -299,7 +301,8 @@ protected override void InitializePanel(ToolStripPanel toolStripPanel)
base.InitializePanel(toolStripPanel);
}

protected static bool IsElementDefined(string className, int part, int state)
protected static bool IsElementDefined(string className, int part,
int state)
{
var el = new VSEInternal(className, part, state);
bool rv;
Expand Down Expand Up @@ -335,9 +338,11 @@ protected override void OnRenderImageMargin(ToolStripRenderEventArgs e)
var rect = e.AffectedBounds;
rect.Y += 2;
rect.Height -= 4;
var sepWidth = renderer.GetPartSize(e.Graphics, ThemeSizeType.True).Width;
var sepWidth =
renderer.GetPartSize(e.Graphics, ThemeSizeType.True).Width;
if (e.ToolStrip.RightToLeft == RightToLeft.Yes) {
rect = new Rectangle(rect.X - extraWidth, rect.Y, sepWidth, rect.Height);
rect = new Rectangle(
rect.X - extraWidth, rect.Y, sepWidth, rect.Height);
rect.X += sepWidth;
}
else {
Expand Down Expand Up @@ -432,7 +437,8 @@ protected override void OnRenderOverflowButtonBackground(
rebarClass,
VisualStyleElement.Rebar.Chevron.Normal.Part,
state);
renderer.DrawBackground(e.Graphics, new Rectangle(Point.Empty, e.Item.Size));
renderer.DrawBackground(
e.Graphics, new Rectangle(Point.Empty, e.Item.Size));
}
else {
base.OnRenderOverflowButtonBackground(e);
Expand Down
3 changes: 2 additions & 1 deletion SimpleDLNA/FormAbout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public FormAbout()
Text = String.Format("About {0}", ProductInformation.Title);
Product.Text = ProductInformation.Title;
Product.Font = BoldFont;
Version.Text = String.Format("Version {0}", ProductInformation.ProductVersion);
Version.Text = String.Format(
"Version {0}", ProductInformation.ProductVersion);
Copyright.Text = ProductInformation.Copyright;
Copyright.Font = ItalicFont;
License.Text = Encoding.UTF8.GetString(Properties.Resources.LICENSE);
Expand Down
Loading

0 comments on commit 320171b

Please sign in to comment.