From 0d7c8f1bd2843eeaf1d49debc6f5347ddc25d1f7 Mon Sep 17 00:00:00 2001 From: goat Date: Mon, 15 Apr 2024 00:45:01 +0200 Subject: [PATCH] add fixed-width font option to icon test widget --- .../Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs index 22f615e8a..a6d76f44f 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/FontAwesomeTestWidget.cs @@ -18,6 +18,7 @@ internal class FontAwesomeTestWidget : IDataWindowWidget private int selectedIconCategory; private string iconSearchInput = string.Empty; private bool iconSearchChanged = true; + private bool useFixedWidth = false; /// public string[]? CommandShortcuts { get; init; } = { "fa", "fatest", "fontawesome" }; @@ -80,6 +81,8 @@ internal class FontAwesomeTestWidget : IDataWindowWidget { this.iconSearchChanged = true; } + + ImGui.Checkbox("Use fixed width font", ref this.useFixedWidth); ImGuiHelpers.ScaledDummy(10f); for (var i = 0; i < this.icons?.Count; i++) @@ -88,7 +91,7 @@ internal class FontAwesomeTestWidget : IDataWindowWidget ImGuiHelpers.ScaledRelativeSameLine(50f); ImGui.Text($"{this.iconNames?[i]}"); ImGuiHelpers.ScaledRelativeSameLine(280f); - ImGui.PushFont(UiBuilder.IconFont); + ImGui.PushFont(this.useFixedWidth ? InterfaceManager.IconFontFixedWidth : InterfaceManager.IconFont); ImGui.Text(this.icons[i].ToIconString()); ImGui.PopFont(); ImGuiHelpers.ScaledDummy(2f);