From 283d54aff617846a353e3f5f917a6789cd5ff101 Mon Sep 17 00:00:00 2001 From: Loporrit <141286461+loporrit@users.noreply.github.com> Date: Mon, 4 Dec 2023 09:51:32 +0000 Subject: [PATCH] Make syncshell list more consistent with the pair group list --- MareSynchronos/UI/Components/GroupPanel.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/MareSynchronos/UI/Components/GroupPanel.cs b/MareSynchronos/UI/Components/GroupPanel.cs index 747a27b..e8fb3f7 100644 --- a/MareSynchronos/UI/Components/GroupPanel.cs +++ b/MareSynchronos/UI/Components/GroupPanel.cs @@ -191,15 +191,13 @@ internal sealed class GroupPanel isExpanded = false; _expandedGroupState.Add(groupDto.GID, isExpanded); } + var icon = isExpanded ? FontAwesomeIcon.CaretSquareDown : FontAwesomeIcon.CaretSquareRight; - var collapseButton = UiSharedService.GetIconButtonSize(icon); - ImGui.PushStyleColor(ImGuiCol.Button, new Vector4(0, 0, 0, 0)); - ImGui.PushStyleColor(ImGuiCol.ButtonHovered, new Vector4(0, 0, 0, 0)); - if (ImGuiComponents.IconButton(icon)) + UiSharedService.FontText(icon.ToIconString(), UiBuilder.IconFont); + if (ImGui.IsItemClicked(ImGuiMouseButton.Left)) { _expandedGroupState[groupDto.GID] = !_expandedGroupState[groupDto.GID]; } - ImGui.PopStyleColor(2); ImGui.SameLine(); var textIsGid = true; @@ -394,7 +392,7 @@ internal sealed class GroupPanel ImGui.EndPopup(); } - ImGui.Indent(collapseButton.X); + ImGui.Indent(20); if (_expandedGroupState[groupDto.GID]) { var visibleUsers = pairsInGroup.Where(u => u.IsVisible) @@ -455,7 +453,7 @@ internal sealed class GroupPanel ImGui.Separator(); ImGui.Unindent(ImGui.GetStyle().ItemSpacing.X / 2); } - ImGui.Unindent(collapseButton.X); + ImGui.Unindent(20); } private void DrawSyncShellButtons(GroupFullInfoDto groupDto, List groupPairs)