fix: calculate child height correctly
This commit is contained in:
parent
44375fca25
commit
fadfd65b97
|
@ -92,12 +92,8 @@ internal class QuestionsTab {
|
|||
var label = ImGui.CalcTextSize(pageLabel);
|
||||
var next = ImGuiHelpers.GetButtonSize(FontAwesomeIcon.ArrowRight.ToIconString());
|
||||
|
||||
var heightLeft = ImGui.GetContentRegionAvail().Y;
|
||||
if (heightLeft > 0) {
|
||||
heightLeft -= Math.Max(prev.Y, next.Y);
|
||||
heightLeft -= ImGui.GetStyle().ItemSpacing.Y;
|
||||
dummyHeight = heightLeft;
|
||||
}
|
||||
dummyHeight += Math.Max(prev.Y, next.Y);
|
||||
dummyHeight += ImGui.GetStyle().ItemSpacing.Y;
|
||||
|
||||
pageButtonsWidth = prev.X + label.X + next.X + ImGui.GetStyle().ItemSpacing.X * 2;
|
||||
}
|
||||
|
@ -113,7 +109,7 @@ internal class QuestionsTab {
|
|||
using var pop = new OnDispose(ImGui.PopTextWrapPos);
|
||||
|
||||
if (loading) {
|
||||
ImGui.TextUnformatted("Loading...");
|
||||
ImGuiHelpers.CenteredText("Loading...");
|
||||
ImGui.Spacing();
|
||||
} else {
|
||||
foreach (var question in this.Plugin.Manager) {
|
||||
|
|
Loading…
Reference in New Issue