Made the Game Font readable

Game font was too large in the image
list view, so made it smaller.
This commit is contained in:
Terry MacDonald 2021-05-15 22:09:56 +12:00
parent 94d9da1b7c
commit 22964f07df
2 changed files with 24 additions and 18 deletions

View File

@ -398,6 +398,7 @@ namespace DisplayMagician.UIForms
using (Brush bItemBack = new SolidBrush(alternate && ImageListView.View == Manina.Windows.Forms.View.Details ?
ImageListView.Colors.AlternateBackColor : ImageListView.Colors.BackColor))
{
//g.FillRectangle(bItemBack, bounds);
g.FillRectangle(bItemBack, bounds);
}
}
@ -405,15 +406,17 @@ namespace DisplayMagician.UIForms
{
using (Brush bItemBack = new SolidBrush(ImageListView.Colors.DisabledBackColor))
{
//g.FillRectangle(bItemBack, bounds);
g.FillRectangle(bItemBack, bounds);
}
}
if ((state & ItemState.Selected) != ItemState.None)
{
//using (Brush bSelected = new LinearGradientBrush(bounds, ImageListView.Colors.SelectedColor1, ImageListView.Colors.SelectedColor2, LinearGradientMode.Vertical))
//using (Brush bSelected = new LinearGradientBrush(bounds, Color.WhiteSmoke, Color.LightGray, LinearGradientMode.Vertical))
using (Brush bSelected = new LinearGradientBrush(bounds, Color.WhiteSmoke, Color.LightGray, LinearGradientMode.Vertical))
{
//Utility.FillRoundedRectangle(g, bSelected, bounds, 12);
Utility.FillRoundedRectangle(g, bSelected, imageBounds, 12);
}
}
@ -433,7 +436,7 @@ namespace DisplayMagician.UIForms
break;
}
}
// Draw image border
if (Math.Min(pos.Width, pos.Height) > 32)
{
@ -459,16 +462,18 @@ namespace DisplayMagician.UIForms
foreColor = ImageListView.Colors.UnFocusedForeColor;
}
Size szt = TextRenderer.MeasureText(item.Text, ImageListView.Font);
Rectangle rt = new Rectangle(bounds.Left + itemPadding.Width, bounds.Top + itemPadding.Height + ImageListView.ThumbnailSize.Height + 4, ImageListView.ThumbnailSize.Width, 3 * szt.Height);
TextFormatFlags flags = TextFormatFlags.EndEllipsis | TextFormatFlags.HorizontalCenter | TextFormatFlags.Top | TextFormatFlags.WordBreak;
Rectangle rt = new Rectangle(bounds.Left + itemPadding.Width, bounds.Top + itemPadding.Height + ImageListView.ThumbnailSize.Height, ImageListView.ThumbnailSize.Width, 3 * szt.Height);
TextFormatFlags flags = TextFormatFlags.EndEllipsis | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.WordBreak;
TextRenderer.DrawText(g, item.Text, ImageListView.Font, rt, foreColor, flags);
if ((state & ItemState.Selected) != ItemState.None)
{
using (Pen pSelectedBorder = new Pen(Color.Brown, 4))
{
//DrawRoundedRectangle(g, pSelectedBorder, bounds, 9);
Utility.DrawRoundedRectangle(g, pSelectedBorder, imageBounds.Left + 1, imageBounds.Top + 1, imageBounds.Width, imageBounds.Height, 10);
//Utility.DrawRoundedRectangle(g, pSelectedBorder, bounds.Left+3, bounds.Top+3, bounds.Width - 5, bounds.Height - 5, 10);
Utility.DrawRoundedRectangle(g, pSelectedBorder, imageBounds.Left, imageBounds.Top, imageBounds.Width, imageBounds.Height, 10);
}
}
}

View File

@ -88,6 +88,7 @@ namespace DisplayMagician.UIForms
this.rb_standalone = new System.Windows.Forms.RadioButton();
this.rb_no_game = new System.Windows.Forms.RadioButton();
this.p_game = new System.Windows.Forms.Panel();
this.ilv_games = new Manina.Windows.Forms.ImageListView();
this.cb_wait_alternative_game = new System.Windows.Forms.CheckBox();
this.btn_choose_alternative_game = new System.Windows.Forms.Button();
this.txt_alternative_game = new System.Windows.Forms.TextBox();
@ -116,7 +117,6 @@ namespace DisplayMagician.UIForms
this.cb_autosuggest = new System.Windows.Forms.CheckBox();
this.btn_hotkey = new System.Windows.Forms.Button();
this.lbl_hotkey_assigned = new System.Windows.Forms.Label();
this.ilv_games = new Manina.Windows.Forms.ImageListView();
this.tabc_shortcut.SuspendLayout();
this.tabp_display.SuspendLayout();
this.tabp_audio.SuspendLayout();
@ -894,6 +894,19 @@ namespace DisplayMagician.UIForms
this.p_game.Size = new System.Drawing.Size(1076, 323);
this.p_game.TabIndex = 7;
//
// ilv_games
//
this.ilv_games.Dock = System.Windows.Forms.DockStyle.Bottom;
this.ilv_games.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ilv_games.Location = new System.Drawing.Point(0, 97);
this.ilv_games.Name = "ilv_games";
this.ilv_games.PersistentCacheDirectory = "";
this.ilv_games.PersistentCacheSize = ((long)(100));
this.ilv_games.Size = new System.Drawing.Size(1076, 226);
this.ilv_games.TabIndex = 28;
this.ilv_games.UseWIC = true;
this.ilv_games.ItemClick += new Manina.Windows.Forms.ItemClickEventHandler(this.ilv_games_ItemClick);
//
// cb_wait_alternative_game
//
this.cb_wait_alternative_game.AutoSize = true;
@ -1244,18 +1257,6 @@ namespace DisplayMagician.UIForms
this.lbl_hotkey_assigned.Visible = false;
this.lbl_hotkey_assigned.Click += new System.EventHandler(this.lbl_hotkey_assigned_Click);
//
// ilv_games
//
this.ilv_games.Dock = System.Windows.Forms.DockStyle.Bottom;
this.ilv_games.Location = new System.Drawing.Point(0, 97);
this.ilv_games.Name = "ilv_games";
this.ilv_games.PersistentCacheDirectory = "";
this.ilv_games.PersistentCacheSize = ((long)(100));
this.ilv_games.Size = new System.Drawing.Size(1076, 226);
this.ilv_games.TabIndex = 28;
this.ilv_games.UseWIC = true;
this.ilv_games.ItemClick += new Manina.Windows.Forms.ItemClickEventHandler(this.ilv_games_ItemClick);
//
// ShortcutForm
//
this.AcceptButton = this.btn_save;