Simplify ImGuiListClipper initialization

This commit is contained in:
Haselnussbomber 2025-07-17 01:54:40 +02:00
parent d25b16aa93
commit a1b8dbcf27
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1
7 changed files with 12 additions and 31 deletions

View file

@ -689,7 +689,7 @@ public sealed class SingleFontChooserDialog : IDisposable
if (ImGui.BeginChild("##familyList", ImGui.GetContentRegionAvail()))
{
var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper());
var clipper = ImGui.ImGuiListClipper();
var lineHeight = ImGui.GetTextLineHeightWithSpacing();
if ((changed || this.firstDrawAfterRefresh) && this.selectedFamilyIndex != -1)
@ -856,7 +856,7 @@ public sealed class SingleFontChooserDialog : IDisposable
if (ImGui.BeginChild("##fontList"))
{
var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper());
var clipper = ImGui.ImGuiListClipper();
var lineHeight = ImGui.GetTextLineHeightWithSpacing();
if ((changed || this.firstDrawAfterRefresh) && this.selectedFontIndex != -1)
@ -960,7 +960,7 @@ public sealed class SingleFontChooserDialog : IDisposable
if (ImGui.BeginChild("##fontSizeList"))
{
var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper());
var clipper = ImGui.ImGuiListClipper();
var lineHeight = ImGui.GetTextLineHeightWithSpacing();
if (changed && this.selectedFontIndex != -1)