Browse Source

Fixed FileStatusListBox for large DPI and fixed background texts for Vista.

LibGit2Sharp
Henk Westhuis 16 years ago
parent
commit
2870759632
  1. 2
      GitCommands/GitExtensions/Program.cs
  2. 1567
      GitUI/Commit.Designer.cs
  3. 2
      GitUI/EditNetSpell.Designer.cs
  4. 4
      GitUI/FileStatusList.Designer.cs
  5. 12
      GitUI/FileStatusList.cs
  6. 2
      GitUI/FormMailMap.cs

2
GitCommands/GitExtensions/Program.cs

@ -45,7 +45,7 @@ namespace GitExtensions
{
}
if (args.Length == 3)
if (args.Length >= 3)
{
if (Directory.Exists(args[2]))
GitCommands.Settings.WorkingDir = args[2];

1567
GitUI/Commit.Designer.cs
File diff suppressed because it is too large
View File

2
GitUI/EditNetSpell.Designer.cs

@ -74,7 +74,7 @@
//
this.EmptyLabel.BackColor = System.Drawing.SystemColors.Window;
this.EmptyLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.EmptyLabel.ForeColor = System.Drawing.SystemColors.GrayText;
this.EmptyLabel.ForeColor = System.Drawing.SystemColors.InactiveCaption;
this.EmptyLabel.Location = new System.Drawing.Point(3, 3);
this.EmptyLabel.Name = "EmptyLabel";
this.EmptyLabel.Size = new System.Drawing.Size(100, 23);

4
GitUI/FileStatusList.Designer.cs

@ -49,11 +49,11 @@
//
this.NoFiles.BackColor = System.Drawing.SystemColors.Window;
this.NoFiles.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NoFiles.ForeColor = System.Drawing.SystemColors.GrayText;
this.NoFiles.ForeColor = System.Drawing.SystemColors.InactiveCaption;
this.NoFiles.Location = new System.Drawing.Point(5, 5);
this.NoFiles.Margin = new System.Windows.Forms.Padding(0);
this.NoFiles.Name = "NoFiles";
this.NoFiles.Size = new System.Drawing.Size(104, 41);
this.NoFiles.Size = new System.Drawing.Size(172, 49);
this.NoFiles.TabIndex = 1;
this.NoFiles.Text = "No changes";
//

12
GitUI/FileStatusList.cs

@ -17,7 +17,8 @@ namespace GitUI
{
InitializeComponent();
FileStatusListBox.DrawMode = DrawMode.OwnerDrawFixed;
FileStatusListBox.DrawMode = DrawMode.OwnerDrawVariable;
FileStatusListBox.MeasureItem += new MeasureItemEventHandler(FileStatusListBox_MeasureItem);
FileStatusListBox.DrawItem += new DrawItemEventHandler(FileStatusListBox_DrawItem);
FileStatusListBox.SelectedIndexChanged += new EventHandler(FileStatusListBox_SelectedIndexChanged);
FileStatusListBox.DoubleClick += new EventHandler(FileStatusListBox_DoubleClick);
@ -29,6 +30,11 @@ namespace GitUI
NoFiles.Visible = false;
}
void FileStatusListBox_MeasureItem(object sender, MeasureItemEventArgs e)
{
e.ItemHeight = (int)e.Graphics.MeasureString(FileStatusListBox.Items[e.Index].ToString(), FileStatusListBox.Font).Height;
}
public void SetNoFilesText(string text)
{
NoFiles.Text = text;
@ -243,8 +249,8 @@ namespace GitUI
private void NoFiles_SizeChanged(object sender, EventArgs e)
{
NoFiles.Location = new Point(3, 3);
NoFiles.Size = new Size(Size.Width - 6, Size.Height - 6);
NoFiles.Location = new Point(5, 5);
NoFiles.Size = new Size(Size.Width - 10, Size.Height - 10);
}

2
GitUI/FormMailMap.cs

@ -24,7 +24,6 @@ namespace GitUI
using (StreamReader re = new StreamReader(Settings.WorkingDir + ".mailmap", Settings.Encoding))
{
MailMapFile = re.ReadToEnd();
re.Close();
}
}
MailMapText.Text = MailMapFile;
@ -43,7 +42,6 @@ namespace GitUI
using (TextWriter tw = new StreamWriter(Settings.WorkingDir + ".mailmap", false, Settings.Encoding))
{
tw.Write(MailMapFile);
tw.Close();
}
Close();
}

Loading…
Cancel
Save