From 6e59ad0f1a5cd0b6e3abf01bb743624f01466beb Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Thu, 28 Sep 2023 21:59:14 +0200 Subject: [PATCH] Fix automated design rows. --- Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs b/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs index ba4a872..496999e 100644 --- a/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs +++ b/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs @@ -151,9 +151,15 @@ public class SetPanel + 150 * ImGuiHelpers.GlobalScale; var singleRow = ImGui.GetContentRegionAvail().X >= requiredSizeOneLine || numSpacing == 0; + var numRows = (singleRow, _config.ShowUnlockedItemWarnings) switch + { + (true, true) => 6, + (true, false) => 5, + (false, true) => 5, + (false, false) => 4, + }; - using var table = ImRaii.Table("SetTable", singleRow && _config.ShowUnlockedItemWarnings ? 6 : 5, - ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollX | ImGuiTableFlags.ScrollY); + using var table = ImRaii.Table("SetTable", numRows, ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollX | ImGuiTableFlags.ScrollY); if (!table) return; @@ -184,6 +190,7 @@ public class SetPanel if (_config.ShowUnlockedItemWarnings) ImGui.TableSetupColumn(string.Empty, ImGuiTableColumnFlags.WidthFixed, 2 * ImGui.GetFrameHeight() + 4 * ImGuiHelpers.GlobalScale); + ImGui.TableHeadersRow(); foreach (var (design, idx) in Selection.Designs.WithIndex()) {