mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix scrolling in Changed Items tab.
This commit is contained in:
parent
572f4f5e6b
commit
2b0d55bc69
2 changed files with 5 additions and 4 deletions
|
|
@ -42,7 +42,7 @@ namespace Penumbra.UI
|
|||
_filterLower = _filter.ToLowerInvariant();
|
||||
}
|
||||
|
||||
if( !ImGui.BeginTable( "##ChangedItemsTable", 1, ImGuiTableFlags.RowBg, AutoFillSize ) )
|
||||
if( !ImGui.BeginTable( "##ChangedItemsTable", 1, ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollY, AutoFillSize ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ namespace Penumbra.UI
|
|||
{
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
_base.DrawChangedItem( name, data );
|
||||
_base.DrawChangedItem( name, data, ImGui.GetStyle().ScrollbarSize );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Penumbra.UI
|
|||
{
|
||||
public partial class SettingsInterface
|
||||
{
|
||||
internal void DrawChangedItem( string name, object? data )
|
||||
internal void DrawChangedItem( string name, object? data, float itemIdOffset = 0)
|
||||
{
|
||||
var ret = ImGui.Selectable( name ) ? MouseButton.Left : MouseButton.None;
|
||||
ret = ImGui.IsItemClicked( ImGuiMouseButton.Right ) ? MouseButton.Right : ret;
|
||||
|
|
@ -30,7 +30,8 @@ namespace Penumbra.UI
|
|||
if( data is Item it )
|
||||
{
|
||||
var modelId = $"({( ( Quad )it.ModelMain ).A})";
|
||||
var offset = ImGui.CalcTextSize( modelId ).X - ImGui.GetStyle().ItemInnerSpacing.X;
|
||||
var offset = ImGui.CalcTextSize( modelId ).X - ImGui.GetStyle().ItemInnerSpacing.X + itemIdOffset;
|
||||
|
||||
ImGui.SameLine( ImGui.GetWindowContentRegionWidth() - offset );
|
||||
ImGui.TextColored( new Vector4( 0.5f, 0.5f, 0.5f, 1 ), modelId );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue