Code cleaning.

+ Use default DPIfont for wxHtmlWindows
This commit is contained in:
YuSanka 2020-09-04 13:00:33 +02:00
parent 436e12e99f
commit c8133b91b7
5 changed files with 7 additions and 54 deletions

View file

@ -114,7 +114,7 @@ ConfigSnapshotDialog::ConfigSnapshotDialog(const Config::SnapshotDB &snapshot_db
// text
html = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO);
{
wxFont font = wxGetApp().normal_font();//wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
wxFont font = get_default_font_for_dpi(get_dpi_for_window(this));// wxGetApp().normal_font();//wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
#ifdef __WXMSW__
const int fs = font.GetPointSize();
const int fs1 = static_cast<int>(0.8f*fs);
@ -140,7 +140,7 @@ ConfigSnapshotDialog::ConfigSnapshotDialog(const Config::SnapshotDB &snapshot_db
void ConfigSnapshotDialog::on_dpi_changed(const wxRect &suggested_rect)
{
wxFont font = GetFont();
wxFont font = get_default_font_for_dpi(get_dpi_for_window(this));// GetFont();
const int fs = font.GetPointSize();
const int fs1 = static_cast<int>(0.8f*fs);
const int fs2 = static_cast<int>(1.1f*fs);