2.0.0 #92

Merged
defnotken merged 171 commits from 2.0.0 into master 2025-12-21 17:19:36 +00:00
Showing only changes of commit 1b2db4c698 - Show all commits

View File

@@ -454,52 +454,63 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
var style = ImGui.GetStyle(); var style = ImGui.GetStyle();
ImGui.PushStyleVar(ImGuiStyleVar.FramePadding, new Vector2(10f, 5f) * ImGuiHelpers.GlobalScale);
ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(8f, style.ItemSpacing.Y));
ImGui.PushStyleVar(ImGuiStyleVar.TabRounding, 5f * ImGuiHelpers.GlobalScale);
var baseTab = UIColors.Get("FullBlack").WithAlpha(0.0f); var baseTab = UIColors.Get("FullBlack").WithAlpha(0.0f);
var baseTabDim = UIColors.Get("FullBlack").WithAlpha(0.1f); var baseTabDim = UIColors.Get("FullBlack").WithAlpha(0.1f);
var accent = UIColors.Get("LightlessPurple"); var accent = UIColors.Get("LightlessPurple");
var accentHover = accent.WithAlpha(0.90f); var accentHover = accent.WithAlpha(0.90f);
var accentActive = accent; var accentActive = accent;
ImGui.PushStyleColor(ImGuiCol.Tab, baseTab); //Pushing style vars for inner tab bar
ImGui.PushStyleColor(ImGuiCol.TabHovered, accentHover); ImGui.PushStyleVar(ImGuiStyleVar.FramePadding, new Vector2(10f, 5f) * ImGuiHelpers.GlobalScale);
ImGui.PushStyleColor(ImGuiCol.TabActive, accentActive); ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(8f, style.ItemSpacing.Y));
ImGui.PushStyleColor(ImGuiCol.TabUnfocused, baseTabDim); ImGui.PushStyleVar(ImGuiStyleVar.TabRounding, 5f * ImGuiHelpers.GlobalScale);
ImGui.PushStyleColor(ImGuiCol.TabUnfocusedActive, accentActive.WithAlpha(0.80f));
using (var innerTabBar = ImRaii.TabBar("user_mgmt_inner_tab_" + GroupFullInfo.GID)) try
{ {
if (innerTabBar) //Pushing color stack for inner tab bar
using (ImRaii.PushColor(ImGuiCol.Tab, baseTab))
using (ImRaii.PushColor(ImGuiCol.TabHovered, accentHover))
using (ImRaii.PushColor(ImGuiCol.TabActive, accentActive))
using (ImRaii.PushColor(ImGuiCol.TabUnfocused, baseTabDim))
using (ImRaii.PushColor(ImGuiCol.TabUnfocusedActive, accentActive.WithAlpha(0.80f)))
{ {
// Users tab using (var innerTabBar = ImRaii.TabBar("syncshell_tab_" + GroupFullInfo.GID))
var usersTab = ImRaii.TabItem("Users");
if (usersTab)
{ {
DrawUserListSection(); if (innerTabBar)
} {
usersTab.Dispose(); // Users tab
var usersTab = ImRaii.TabItem("Users");
if (usersTab)
{
DrawUserListSection();
}
usersTab.Dispose();
// Cleanup tab // Cleanup tab
var cleanupTab = ImRaii.TabItem("Cleanup"); var cleanupTab = ImRaii.TabItem("Cleanup");
if (cleanupTab) if (cleanupTab)
{ {
DrawMassCleanupSection(); DrawMassCleanupSection();
} }
cleanupTab.Dispose(); cleanupTab.Dispose();
// Bans tab // Bans tab
var bansTab = ImRaii.TabItem("Bans"); var bansTab = ImRaii.TabItem("Bans");
if (bansTab) if (bansTab)
{ {
DrawUserBansSection(); DrawUserBansSection();
}
bansTab.Dispose();
}
} }
bansTab.Dispose();
} }
mgmtTab.Dispose();
}
finally
{
// Popping style vars (3) for inner tab bar
ImGui.PopStyleVar(3);
} }
mgmtTab.Dispose();
} }
private void DrawUserListSection() private void DrawUserListSection()