Automatically scale imgui text based on display pixel density (#545)

This commit is contained in:
goeiecool9999 2022-12-01 15:58:08 +01:00 committed by GitHub
parent 503e99d069
commit 2cfb7f3737
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 52 additions and 19 deletions

View file

@ -1523,6 +1523,7 @@ void MainWindow::OnSizeEvent(wxSizeEvent& event)
g_window_info.height = client_size.GetHeight();
g_window_info.phys_width = ToPhys(client_size.GetWidth());
g_window_info.phys_height = ToPhys(client_size.GetHeight());
g_window_info.dpi_scale = GetDPIScaleFactor();
if (m_debugger_window && m_debugger_window->IsShown())
m_debugger_window->OnParentMove(GetPosition(), event.GetSize());
@ -1540,6 +1541,7 @@ void MainWindow::OnDPIChangedEvent(wxDPIChangedEvent& event)
g_window_info.height = client_size.GetHeight();
g_window_info.phys_width = ToPhys(client_size.GetWidth());
g_window_info.phys_height = ToPhys(client_size.GetHeight());
g_window_info.dpi_scale = GetDPIScaleFactor();
}
void MainWindow::OnMove(wxMoveEvent& event)