mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-14 10:10:12 +01:00
Fix column width in debugger lists when scrollbars are present
This commit is contained in:
1 parent
3fa5816aab
commit
d8f3e22f14
1 file changed
+14
-1
@@ -59,7 +59,7 @@ void GenericListView::resizeColumns(int totalWidth)
|
||||
|
||||
void GenericListView::sizeEvent(wxSizeEvent& evt)
|
||||
{
|
||||
resizeColumns(evt.GetSize().x);
|
||||
resizeColumns(GetClientSize().x);
|
||||
}
|
||||
|
||||
void GenericListView::keydownEvent(wxKeyEvent& evt)
|
||||
@@ -87,7 +87,20 @@ void GenericListView::keydownEvent(wxKeyEvent& evt)
|
||||
void GenericListView::update()
|
||||
{
|
||||
int newRows = getRowCount();
|
||||
int oldRows = GetItemCount();
|
||||
|
||||
SetItemCount(newRows);
|
||||
|
||||
if (newRows != oldRows)
|
||||
{
|
||||
resizeColumns(GetClientSize().x);
|
||||
|
||||
// wx adds the horizontal scrollbar based on the old column width,
|
||||
// which changes the client width. Simply resizing the columns won't
|
||||
// make the scrollbar go away, so let's make it recalculate if it needs it
|
||||
SetItemCount(newRows);
|
||||
}
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user