Shift the group pause button over to the right
This commit is contained in:
@@ -200,14 +200,6 @@ internal sealed class GroupPanel
|
|||||||
_expandedGroupState[groupDto.GID] = !_expandedGroupState[groupDto.GID];
|
_expandedGroupState[groupDto.GID] = !_expandedGroupState[groupDto.GID];
|
||||||
}
|
}
|
||||||
ImGui.PopStyleColor(2);
|
ImGui.PopStyleColor(2);
|
||||||
ImGui.SameLine(ImGui.GetWindowContentRegionMin().X + collapseButton.X);
|
|
||||||
var pauseIcon = groupDto.GroupUserPermissions.IsPaused() ? FontAwesomeIcon.Play : FontAwesomeIcon.Pause;
|
|
||||||
if (ImGuiComponents.IconButton(pauseIcon))
|
|
||||||
{
|
|
||||||
var userPerm = groupDto.GroupUserPermissions ^ GroupUserPermissions.Paused;
|
|
||||||
_ = ApiController.GroupChangeIndividualPermissionState(new GroupPairUserPermissionDto(groupDto.Group, new UserData(ApiController.UID), userPerm));
|
|
||||||
}
|
|
||||||
UiSharedService.AttachToolTip((groupDto.GroupUserPermissions.IsPaused() ? "Resume" : "Pause") + " pairing with all users in this Syncshell");
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
||||||
var textIsGid = true;
|
var textIsGid = true;
|
||||||
@@ -494,7 +486,13 @@ internal sealed class GroupPanel
|
|||||||
var barbuttonSize = UiSharedService.GetIconButtonSize(FontAwesomeIcon.Bars);
|
var barbuttonSize = UiSharedService.GetIconButtonSize(FontAwesomeIcon.Bars);
|
||||||
var isOwner = string.Equals(groupDto.OwnerUID, ApiController.UID, StringComparison.Ordinal);
|
var isOwner = string.Equals(groupDto.OwnerUID, ApiController.UID, StringComparison.Ordinal);
|
||||||
|
|
||||||
ImGui.SameLine(ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() - barbuttonSize.X - (showInfoIcon ? iconSize.X : 0) - diffLockUnlockIcons - (showInfoIcon ? ImGui.GetStyle().ItemSpacing.X : 0));
|
var spacingX = ImGui.GetStyle().ItemSpacing.X;
|
||||||
|
var windowEndX = ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth();
|
||||||
|
var pauseIcon = groupDto.GroupUserPermissions.IsPaused() ? FontAwesomeIcon.Play : FontAwesomeIcon.Pause;
|
||||||
|
var pauseIconSize = UiSharedService.GetIconButtonSize(pauseIcon);
|
||||||
|
|
||||||
|
ImGui.SameLine(windowEndX - barbuttonSize.X - (showInfoIcon ? iconSize.X : 0) - diffLockUnlockIcons - (showInfoIcon ? spacingX : 0) - pauseIconSize.X - spacingX);
|
||||||
|
|
||||||
if (showInfoIcon)
|
if (showInfoIcon)
|
||||||
{
|
{
|
||||||
UiSharedService.FontText(infoIcon.ToIconString(), UiBuilder.IconFont);
|
UiSharedService.FontText(infoIcon.ToIconString(), UiBuilder.IconFont);
|
||||||
@@ -577,6 +575,14 @@ internal sealed class GroupPanel
|
|||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGuiComponents.IconButton(pauseIcon))
|
||||||
|
{
|
||||||
|
var userPerm = groupDto.GroupUserPermissions ^ GroupUserPermissions.Paused;
|
||||||
|
_ = ApiController.GroupChangeIndividualPermissionState(new GroupPairUserPermissionDto(groupDto.Group, new UserData(ApiController.UID), userPerm));
|
||||||
|
}
|
||||||
|
UiSharedService.AttachToolTip((groupDto.GroupUserPermissions.IsPaused() ? "Resume" : "Pause") + " pairing with all users in this Syncshell");
|
||||||
|
ImGui.SameLine();
|
||||||
|
|
||||||
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + diffLockUnlockIcons);
|
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + diffLockUnlockIcons);
|
||||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Bars))
|
if (ImGuiComponents.IconButton(FontAwesomeIcon.Bars))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user