Fix the About tab so the translator list is reachable

The translator section sat inside a child window whose height was
computed as "whatever is left in the content region minus a line".
Once the About copy grew with the new mission and rewritten built-on
sections, that remaining space dropped close to zero on smaller
settings windows, so the tree node was rendered but its content was
either invisible or unscrollable from the parent.

Drop the fixed-height child entirely. The settings window already
provides a scroll container around each tab, so rendering the tree
node and the translator list directly into it lets the parent
handle the scroll. The translators get a manual indent push to keep
the visual nesting that the child-frame used to suggest.
This commit is contained in:
2026-05-02 03:54:34 +02:00
parent 59332ce9ea
commit 6b44310e04
+7 -10
View File
@@ -109,23 +109,20 @@ internal sealed class About : ISettingsTab
ImGui.Spacing(); ImGui.Spacing();
var height = ImGui.GetContentRegionAvail().Y - ImGui.CalcTextSize("A").Y - ImGui.GetStyle().ItemSpacing.Y * 2; // The translator list lives at the bottom of the About tab. Render
using (var aboutChild = ImRaii.Child("about", new Vector2(-1, height))) // it directly inside the parent scroll container instead of a
// fixed-height child — the previous "remaining space" calculation
// shrank to zero (or below) once the About copy grew, which made
// the section unreachable on smaller settings windows.
using (var treeNode = ImRaii.TreeNode(HellionStrings.About_Translators_TreeNode))
{ {
if (aboutChild)
{
using var treeNode = ImRaii.TreeNode(HellionStrings.About_Translators_TreeNode);
if (treeNode) if (treeNode)
{ {
using var translatorChild = ImRaii.Child("translators"); using var indent = ImRaii.PushIndent(ImGui.GetStyle().IndentSpacing, false);
if (translatorChild)
{
foreach (var translator in Translators) foreach (var translator in Translators)
ImGui.TextUnformatted(translator); ImGui.TextUnformatted(translator);
} }
} }
}
}
ImGui.Spacing(); ImGui.Spacing();
} }
} }