Skip to content

Commit

Permalink
Revert to using the original fonts
Browse files Browse the repository at this point in the history
Instead of using the OS font (e.g. Segoe UI) everywhere, use the original mixture of different fonts in different dialogs. It improves the rendering of spacing between elements without having to recalculate the whole layout manually to fit the OS font.
  • Loading branch information
pstranak-sw committed Feb 21, 2021
1 parent f326259 commit d5d5f6f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public partial class FindReplaceDialog : Form

public FindReplaceDialog()
{
SwqlStudio.Utils.DpiHelper.FixFont(this);
this.Font = new Font("Tahoma", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
InitializeComponent();

_autoPosition = true;
Expand Down
13 changes: 7 additions & 6 deletions Src/SwqlStudio/About.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Src/SwqlStudio/About.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using System.Linq;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
using SwqlStudio.Utils;

namespace SwqlStudio
{
public partial class About : Form
{
public About()
{
DpiHelper.FixFont(this);
this.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
InitializeComponent();

var assembly = Assembly.GetEntryAssembly();
Expand Down
6 changes: 3 additions & 3 deletions Src/SwqlStudio/Utils/DpiHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ internal static class DpiHelper
/// <summary>
/// The default font used in SWQL Studio dialogs
/// </summary>
/// <remarks>Returns the default font used by the OS.</remarks>
/// <value><see cref="SystemFonts.MessageBoxFont"/></value>
public static readonly Font DefaultFont = SystemFonts.MessageBoxFont;
/// <remarks>Returns the default .Net font.</remarks>
/// <value>Microsoft Sans Serif, 8.25F</value>
public static readonly Font DefaultFont = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);

/// <summary>
/// Sets the <see cref="DefaultFont"/> as the default font for the <paramref name="control"/>
Expand Down

0 comments on commit d5d5f6f

Please sign in to comment.