From: <sv...@op...> - 2024-11-10 17:29:37
|
Author: sagamusix Date: Sun Nov 10 18:29:25 2024 New Revision: 22146 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22146 Log: [Fix] Fix truncated display of first item in checkbox lists in particular on high-DPI displays. Potentially also fixes https://bugs.openmpt.org/view.php?id=1480 Modified: trunk/OpenMPT/mptrack/GeneralConfigDlg.cpp trunk/OpenMPT/mptrack/dlg_misc.cpp Modified: trunk/OpenMPT/mptrack/GeneralConfigDlg.cpp ============================================================================== --- trunk/OpenMPT/mptrack/GeneralConfigDlg.cpp Sun Nov 10 17:52:08 2024 (r22145) +++ trunk/OpenMPT/mptrack/GeneralConfigDlg.cpp Sun Nov 10 18:29:25 2024 (r22146) @@ -144,6 +144,7 @@ m_CheckList.SetCheck(idx, check); } m_CheckList.SetCurSel(0); + m_CheckList.SetItemHeight(0, 0); // Workaround to force MFC to correctly compute the height of the first list item, in particular on high-DPI setups OnOptionSelChanged(); return TRUE; Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp ============================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp Sun Nov 10 17:52:08 2024 (r22145) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp Sun Nov 10 18:29:25 2024 (r22146) @@ -574,6 +574,7 @@ BOOL CLegacyPlaybackSettingsDlg::OnInitDialog() { ResizableDialog::OnInitDialog(); + m_CheckList.SetItemHeight(0, 0); // Workaround to force MFC to correctly compute the height of the first list item, in particular on high-DPI setups OnFilterStringChanged(); UpdateSelectDefaults(); return TRUE; |