-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add support for per-monitor DPI awareness #422
base: master
Are you sure you want to change the base?
Conversation
… Add support for per-monitor DPI awareness (9)
# Conflicts: # Externals/crystaledit/Sample/MainFrm.h # Externals/crystaledit/editlib/ccrystaltextview.h # Externals/crystaledit/editlib/dialogs/memcombo.cpp # Externals/crystaledit/editlib/renderers/ccrystalrenderergdi.cpp # Externals/crystaledit/editlib/utils/hqbitmap.cpp # Externals/crystaledit/editlib/utils/hqbitmap.h # Src/Common/BCMenu.cpp # Src/MainFrm.cpp # Src/Merge.h # Src/Merge.vs2017.vcxproj.filters # Src/Merge.vs2019.vcxproj.filters # Src/TrDialogs.h
# Conflicts: # Src/DirFrame.cpp
# Conflicts: # Externals/crystaledit/Sample/SampleStatic.vcxproj # Externals/crystaledit/Sample/SampleStatic.vs2017.vcxproj # Externals/crystaledit/Sample/SampleStatic.vs2017.vcxproj.filters # Externals/crystaledit/Sample/SampleStatic.vs2019.vcxproj.filters # Externals/crystaledit/Sample/resource.h # Src/Common/BCMenu.cpp # Src/Common/MDITabBar.h # Src/Common/MessageBoxDialog.cpp # Src/DirView.cpp # Src/DirView.h # Src/EditorFilepathBar.cpp # Src/EditorFilepathBar.h # Src/LineFiltersDlg.cpp # Src/MainFrm.cpp # Src/MainFrm.h # Src/Merge.h # Src/Merge.vcxproj # Src/Merge.vcxproj.filters # Src/Merge.vs2017.vcxproj # Src/Merge.vs2017.vcxproj.filters # Src/MergeFrameCommon.cpp # Src/MergeFrameCommon.h # Src/MergeStatusBar.cpp # Src/MergeStatusBar.h # Src/OpenFrm.cpp # Src/OpenView.cpp # Src/PluginsListDlg.cpp
|
||
afx_msg LRESULT OnDpiChanged(WPARAM wParam, LPARAM lParam) | ||
{ | ||
int olddpi = m_dpi; |
Check notice
Code scanning / CodeQL
Unused local variable Note
|
||
afx_msg LRESULT OnDpiChanged(WPARAM wParam, LPARAM lParam) | ||
{ | ||
int olddpi = m_dpi; |
Check notice
Code scanning / CodeQL
Unused local variable Note
GetClientRect(m_hwndDlg, &rcClient); | ||
const int newnonclientsx = rc.Width() - rcClient.Width(); | ||
const int newnonclientsy = rc.Height() - rcClient.Height(); | ||
const RECT* pRect = reinterpret_cast<RECT*>(lParam); |
Check notice
Code scanning / CodeQL
Unused local variable Note
/* | ||
CFont *pFont = GetFont(); | ||
LOGFONT lfFont; | ||
pFont->GetLogFont(&lfFont); | ||
CSize size = Dialog_GetSizeFromTemplate(m_lpszTemplateName, lfFont.lfFaceName, MulDiv(abs(lfFont.lfHeight), 72, m_dpi)); | ||
SetWindowPos(nullptr, 0, 0, size.cx, size.cy, SWP_NOMOVE | SWP_NOZORDER); | ||
LoadDynamicLayoutResource(m_lpszTemplateName); | ||
*/ |
Check notice
Code scanning / CodeQL
Commented-out code Note
// sizeMin = GetDynamicLayout()->GetMinSize(); | ||
// CRect rc = m_rcInit; | ||
// AdjustWindowRectEx(&rc, GetStyle(), false, GetExStyle()); | ||
// SetWindowPos(nullptr, 0, 0, rc.right - rc.left, rc.bottom - rc.top, SWP_NOMOVE | SWP_NOZORDER); | ||
// GetDynamicLayout()->Adjust(); |
Check notice
Code scanning / CodeQL
Commented-out code Note
/* | ||
int temp = DpiAware::GetSystemMetricsForDpi(SM_CYMENU, dpi); | ||
int temp2 = MulDiv(m_iconY + BCMENU_PAD, dpi, USER_DEFAULT_SCREEN_DPI); | ||
lpMIS->itemHeight = temp>temp2 ? temp : temp2; | ||
*/ |
Check notice
Code scanning / CodeQL
Commented-out code Note
@@ -37,7 +38,7 @@ | |||
* The bar looks like a statusBar (font, height). The control | |||
* displays a tip for each path (as a tooltip). | |||
*/ | |||
class CEditorFilePathBar : public CDialogBar, public IHeaderBar | |||
class CEditorFilePathBar : public DpiAware::CDpiAwareWnd<CDialogBar>, public IHeaderBar |
Check notice
Code scanning / CodeQL
Undisciplined multiple inheritance Note
if (bDynamicLayoutEnabled) | ||
{ | ||
/* | ||
CFont *pFont = GetFont(); | ||
LOGFONT lfFont; | ||
pFont->GetLogFont(&lfFont); | ||
CSize size = Dialog_GetSizeFromTemplate(m_lpszTemplateName, lfFont.lfFaceName, MulDiv(abs(lfFont.lfHeight), 72, m_dpi)); | ||
SetWindowPos(nullptr, 0, 0, size.cx, size.cy, SWP_NOMOVE | SWP_NOZORDER); | ||
LoadDynamicLayoutResource(m_lpszTemplateName); | ||
*/ | ||
} |
Check notice
Code scanning / CodeQL
Futile conditional Note
# Conflicts: # Src/Common/BCMenu.cpp # Src/Common/MessageBoxDialog.cpp # Src/Common/SuperComboBox.cpp # Src/OpenFrm.cpp
# Conflicts: # Externals/crystaledit/Sample/resource.h # Externals/crystaledit/editlib/ccrystaltextview.cpp # Externals/crystaledit/editlib/ccrystaltextview.h # Externals/freeimage # Externals/sevenzip # Externals/winimerge # Src/DirView.h # Src/EditorFilepathBar.cpp # Src/MainFrm.cpp # Src/MainFrm.h # Src/Merge.h # Src/Merge.vcxproj # Src/Merge.vcxproj.filters # Src/OpenFrm.cpp # Src/OpenView.cpp # Testing/FolderCompare/FolderCompare.vcxproj.filters
No description provided.